Make linker assigned symbol dynamic only for shared object
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 23 Feb 2016 13:18:43 +0000 (05:18 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 23 Feb 2016 13:19:03 +0000 (05:19 -0800)
commit6b3b0ab89663306d17927d630304dbbd36e84570
treeeecbc3d7e2d224602ea525556436a5fa5645d0a2
parent17733f5be961baa7a47fdf1471aa6948372293d6
Make linker assigned symbol dynamic only for shared object

Linker assigned symbols should be made dynamic by default only when
creating shared object or relocatable executable.

bfd/

* elflink.c (bfd_elf_record_link_assignment): Check for shared
library, instead of PIC, and don't check PDE when making linker
assigned symbol dynamic.

ld/

* testsuite/ld-frv/fdpic-pie-6.d: Updated.
* testsuite/ld-mips-elf/pie-n32.d: Likewise.
* testsuite/ld-mips-elf/pie-n64.d: Likewise.
* testsuite/ld-mips-elf/pie-o32.d: Likewise.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-frv/fdpic-pie-6.d
ld/testsuite/ld-mips-elf/pie-n32.d
ld/testsuite/ld-mips-elf/pie-n64.d
ld/testsuite/ld-mips-elf/pie-o32.d