Landing: ef105489af06
Project / Subsystem
binutils / bfd
Date
2026-05-14
Author
Alan Modra <amodra@sourceware.org>
Commit
ef105489af06595c66d13d3a15d0f160856f36e8
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- bfd
- patch_id
- —
- commit_hash
- ef105489af06595c66d13d3a15d0f160856f36e8
- source_type
- public_inbox
- headline
- Create .rela.got/.rel.got later in _bfd_elf_create_got_section.
- tldr
- Fixes a rare linker issue where the .rela.got or .rel.got section is created before .got, leading to incorrect section mapping when using linker scripts.
- author
- Alan Modra <amodra@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • bfd
- • linker
- • elf
- • got
- • linker script
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-14T00:00:00.000Z
The function _bfd_elf_create_got_section in BFD previously created the .rela.got or .rel.got section before the .got section. While this is normally not a problem, it can lead to issues when using linker scripts that map uninteresting sections to a .junk section, especially when using a linker-created dynamic object. This commit reorders the section creation to avoid this issue, ensuring that the .got section is always created first.