mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-13 13:49:00 +08:00
x86: Properly check building shared library
If a symbol is not defined in a regular file, and we are not generating a shared library, then set the symbol to its location in the .plt. This is required to make function pointers compare as equal between the normal executable and the shared library. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library.
This commit is contained in:
parent
db5d5ad16f
commit
1031c264fd
@ -1,3 +1,8 @@
|
||||
2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
|
||||
instead of bfd_link_pic, for building shared library.
|
||||
|
||||
2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR gas/22791
|
||||
|
@ -200,7 +200,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|
||||
location in the .plt. This is required to make function
|
||||
pointers compare as equal between the normal executable and
|
||||
the shared library. */
|
||||
if (! bfd_link_pic (info)
|
||||
if (! bfd_link_dll (info)
|
||||
&& !h->def_regular)
|
||||
{
|
||||
if (use_plt_got)
|
||||
|
Loading…
x
Reference in New Issue
Block a user