x86-64: Properly report output type when PIC is needed
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 23 Aug 2017 20:40:49 +0000 (13:40 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 23 Aug 2017 20:43:45 +0000 (13:43 -0700)
commitaab921adcb656e4eefcc7d0f14241f3d7504400e
tree96f0d19086c092a9126bf5627164c2c23d6141f1
parentb1bb697ea1259c0977c38f1ec5f2239cbe669869
x86-64: Properly report output type when PIC is needed

-fPIC may be needed to compile PIE or PDE objects, not just shared
object.

bfd/

* elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
bfd_link_info.  Report shared, PIE or PDE object based on
bfd_link_info.
(elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
(elf_x86_64_relocate_section): Likewise.

ld/

* testsuite/ld-x86-64/pie2.d: Updated.
* testsuite/ld-x86-64/pr19719.d: Likewise.
* testsuite/ld-x86-64/pr19807-2a.d: Likewise.
* testsuite/ld-x86-64/pr19969.d: Likewise.
bfd/ChangeLog
bfd/elf64-x86-64.c
ld/ChangeLog
ld/testsuite/ld-x86-64/pie2.d
ld/testsuite/ld-x86-64/pr19719.d
ld/testsuite/ld-x86-64/pr19807-2a.d
ld/testsuite/ld-x86-64/pr19969.d
This page took 0.027758 seconds and 4 git commands to generate.