binutils Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
hppa64

HPPA64: Avoid creating dynamic section too late.

Fixes a bug in HPPA64 ELF handling where creating a dynamic section too late in the linking process could cause it not to be mapped to an output section.

The HPPA64 backend in BFD had a bug where it would attempt to create the .opd section (used for procedure descriptors) too late in the linking process, specifically in elf64_hppa_mark_exported_functions and elf64_hppa_late_size_sections. This could cause the section not to be mapped to an output section, leading to issues when using linker-created dynamic objects. This commit avoids creating the section if it doesn’t exist and adjusts the checks to be more robust.

In Details

This commit addresses issues in elf64-hppa.c related to dynamic object creation. The .opd section, used for procedure descriptors on HPPA64, must be created early enough to be mapped correctly. Specifically, the calls to get_opd within elf64_hppa_mark_exported_functions and checks within elf64_hppa_finalize_dynreloc are adjusted to avoid late dynamic section creation and handle discarded sections robustly.

For Context

This commit pertains to the HPPA64 architecture support within the Binary File Descriptor (BFD) library. Procedure descriptors provide metadata about functions, and the .opd section stores these descriptors in ELF files. Dynamic objects created by the linker need these sections set up correctly and creation during the late sizing phase causes issues. The fix ensures that the .opd section is properly created and handled during the linking process.

Filed Under: bfdhppa64elflinkerdynamic object