Revert commit aab921adcb656e4eefcc7d0f14241f3d7504400e
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Aug 2017 10:33:42 +0000 (03:33 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Aug 2017 10:35:44 +0000 (03:35 -0700)
* 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.

bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c

index 9cb390c25dbf04464873560c4dede48c380100eb..a45b896e520db6c8facfd2059e8874363c9213e4 100644 (file)
@@ -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
index ae23752119c591ff534493f35992dcf61fda3201..1009c17ff21c1c28caf8b7b14e272abfa68abf60 100644 (file)
@@ -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)
index 775c911307503e9d7e68b2c69ff8cb7496e02be3..84d63f404e198aebafb500eb78e8888fafdd9dda 100644 (file)
@@ -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)
This page took 0.032652 seconds and 4 git commands to generate.