old-cross-binutils/ld/testsuite/ld-x86-64/pr18160.d
H.J. Lu b19a8f8545 Skip gc-sections if relocation is incompatible
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.
2015-03-26 08:22:55 -07:00

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