b19a8f8545
This patch skips gc-sections if input relocation is incompatible with output. bfd/ PR ld/18160 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible. (bfd_elf_gc_sections): Likewise. ld/testsuite/ PR ld/18160 * ld-x86-64/pr18160.d: New file. * ld-x86-64/pr18160.s: Likewise. * ld-x86-64/pr18160.t: Likewise. * ld-x86-64/x86-64.exp: Run pr18160.
14 lines
254 B
Makefile
14 lines
254 B
Makefile
#as: --64
|
|
#ld: --gc-sections -melf_x86_64 -T pr18160.t
|
|
#objdump: -dw
|
|
|
|
.*: +file format elf32-i386
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
0+ <start>:
|
|
[ ]*[a-f0-9]+: e9 00 00 00 00 jmp 5 <foo>
|
|
|
|
0+5 <foo>:
|
|
[ ]*[a-f0-9]+: c3 ret
|