Revert commit aab921adcb
* elf32-i386.c (elf_i386_check_relocs): Revert the last change. Undefined symbols may not have a type. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
This commit is contained in:
parent
f1902523c9
commit
34bb2571d4
|
@ -1,3 +1,9 @@
|
|||
2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-i386.c (elf_i386_check_relocs): Revert the last change.
|
||||
Undefined symbols may not have a type.
|
||||
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
|
||||
|
||||
2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
|
||||
|
|
|
@ -2273,9 +2273,8 @@ do_relocation:
|
|||
/* We may need a .plt entry if the symbol is a function
|
||||
defined in a shared lib or is a STT_GNU_IFUNC function
|
||||
referenced from the code or read-only section. */
|
||||
if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC)
|
||||
&& (!h->def_regular
|
||||
|| (sec->flags & (SEC_CODE | SEC_READONLY)) != 0))
|
||||
if (!h->def_regular
|
||||
|| (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
|
||||
h->plt.refcount += 1;
|
||||
|
||||
if (r_type == R_386_PC32)
|
||||
|
|
|
@ -2726,9 +2726,8 @@ pointer:
|
|||
/* We may need a .plt entry if the symbol is a function
|
||||
defined in a shared lib or is a STT_GNU_IFUNC function
|
||||
referenced from the code or read-only section. */
|
||||
if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC)
|
||||
&& (!h->def_regular
|
||||
|| (sec->flags & (SEC_CODE | SEC_READONLY)) != 0))
|
||||
if (!h->def_regular
|
||||
|| (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
|
||||
h->plt.refcount += 1;
|
||||
|
||||
if (r_type == R_X86_64_PC32)
|
||||
|
|
Loading…
Reference in New Issue