mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
06bcf5416f
The fix for the PR is to not use input_section->output_section->owner to get to the output bfd, but use the output bfd directly since it is available nowadays in struct bfd_link_info. I thought it worth warning when non-empty dynamic sections are discarded too, which meant a tweak to one of the ld tests to avoid the warning. bfd/ PR 22431 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding non-empty dynamic section. (ppc_build_one_stub): Take elf_gp from output bfd, not output section owner. (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise. ld/ * testsuite/ld-elf/note-3.t: Don't discard .got.
25 lines
549 B
Raku
25 lines
549 B
Raku
PHDRS
|
|
{
|
|
text PT_LOAD FILEHDR PHDRS ;
|
|
note PT_NOTE;
|
|
}
|
|
SECTIONS
|
|
{
|
|
. = . + SIZEOF_HEADERS ;
|
|
.text : { *(.text) *(.rodata) } :text
|
|
.note : { *(.note) } :note :text
|
|
|
|
/* BUG: This linker script is broken here. It has not reset the
|
|
output segment for the following sections, so they are all
|
|
treated as notes... */
|
|
|
|
.hash : { *(.hash) }
|
|
.gnu.hash : { *(.gnu.hash) }
|
|
|
|
.dynstr : { *(.dynstr) }
|
|
.dynsym : { *(.dynsym) }
|
|
.got : { *(.got .toc) *(.igot) }
|
|
.got.plt : { *(.got.plt) *(.igot.plt) }
|
|
/DISCARD/ : { *(*) }
|
|
}
|