i386: Force symbol dynamic if it isn't undefined weak
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 24 Apr 2017 20:42:33 +0000 (13:42 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 24 Apr 2017 20:42:33 +0000 (13:42 -0700)
commit0dc9a308a1ec9675bf6b33bae9e8b1faa0bad9ed
tree41f884708e91b4353f6c598b6115d06bef9565e9
parente1ba30532c6de26a14404ab4919bb591e8da3eab
i386: Force symbol dynamic if it isn't undefined weak

Force symbol dynamic if it isn't undefined weak.  Generate R_386_RELATIVE
relocation for R_386_GOT32 relocation against non-dynamic symbol in PIC.

PR ld/21402
* elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
undefined weak symbol, don't make it dynamic.
(elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
set no_finish_dynamic_symbol and generate R_386_RELATIVE
relocation for R_386_GOT32.
bfd/ChangeLog
bfd/elf32-i386.c