mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +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:
@ -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>
|
2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR gas/22791
|
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
|
location in the .plt. This is required to make function
|
||||||
pointers compare as equal between the normal executable and
|
pointers compare as equal between the normal executable and
|
||||||
the shared library. */
|
the shared library. */
|
||||||
if (! bfd_link_pic (info)
|
if (! bfd_link_dll (info)
|
||||||
&& !h->def_regular)
|
&& !h->def_regular)
|
||||||
{
|
{
|
||||||
if (use_plt_got)
|
if (use_plt_got)
|
||||||
|
Reference in New Issue
Block a user