Skip gc-sections if relocation is incompatible
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 26 Mar 2015 15:22:08 +0000 (08:22 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 26 Mar 2015 15:22:55 +0000 (08:22 -0700)
commitb19a8f8545100a08ee2a64c05631aff6f651faa1
treea1400638db4f72f3359a2c20932b58a2d607dbcf
parent20d35291fb30a2fa5de46af56887f9bc4da7e53e
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.
bfd/ChangeLog
bfd/elflink.c
ld/testsuite/ChangeLog
ld/testsuite/ld-x86-64/pr18160.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr18160.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr18160.t [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp