]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR 33726, symbols in excluded sections
authorAlan Modra <amodra@gmail.com>
Thu, 25 Dec 2025 11:47:10 +0000 (22:17 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 26 Dec 2025 00:24:53 +0000 (10:54 +1030)
commit4dc7130975cfcbc263f5bad2aa9e35fc3eb10d5c
tree790a4e0938416db4e80d9ef3f6cdf8d261a4f1ab
parent2254b6eb07a5edc71b16c9163f8d4df86094024a
PR 33726, symbols in excluded sections

This improves "nearby" section choice when memory regions are active,
preferring a section in the same region as the excluded section over
other sections.

PR 33726
include/
* bfdlink.h (struct bfd_link_callbacks): Add nearby_section.
(_bfd_nearby_section): Delete.
(bfd_fix_excluded_sec_syms): Rename and remove bfd param from
_bfd_fix_excluded_sec_syms.
bfd/
* linker.c (_bfd_nearby_section): Delete.
(fix_syms): Use linker callback.
* elflink.c (elf_link_input_bfd): Likewise.
(_bfd_elf_final_link): Update.
ld/
* ldemul.c (finish_default): Update.
* ldlang.c (lang_output_section_get): Delete.
(ldlang_nearby_section): New function.
* ldlang.h (ldlang_nearby_section): Declare.
(lang_output_section_get): New static inline.
* ldmain.c (link_callbacks): Add ldlang_nearby_section.
bfd/elflink.c
bfd/linker.c
include/bfdlink.h
ld/ldemul.c
ld/ldlang.c
ld/ldlang.h
ld/ldmain.c