x86: Remove target_id from elf_x86_link_hash_table
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Jun 2020 16:56:25 +0000 (09:56 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Jun 2020 16:56:25 +0000 (09:56 -0700)
Since target_id in elf_x86_link_hash_table is the same as hash_table_id
in elf_link_hash_table, we can use elf.hash_table_id instead of target_id.

* elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
(is_x86_elf): Check elf.hash_table_id instead of target_id.
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.

bfd/ChangeLog
bfd/elfxx-x86.c
bfd/elfxx-x86.h

index 13a3ed180b5c219700252bad36ada1de1dfd15ad..fb87353fe15a31cdb2d00567e7b96d8016115c48 100644 (file)
@@ -1,3 +1,9 @@
+2020-06-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
+       (is_x86_elf): Check elf.hash_table_id instead of target_id.
+       * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
+
 2020-06-04  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/26080
index 035b5c5c64c4207018accb279d7957064336700c..d796292562b569c599f9a50c80de5a169369a554 100644 (file)
@@ -762,7 +762,6 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
          ret->tls_get_addr = "___tls_get_addr";
        }
     }
-  ret->target_id = bed->target_id;
   ret->target_os = get_elf_x86_backend_data (abfd)->target_os;
 
   ret->loc_hash_table = htab_try_create (1024,
index c717cd16e56ed18749fd9589410cad42adada3b9..de4e78f443e20771b199f12735ca0227a13572af 100644 (file)
@@ -531,7 +531,6 @@ struct elf_x86_link_hash_table
   bfd_vma (*r_info) (bfd_vma, bfd_vma);
   bfd_vma (*r_sym) (bfd_vma);
   bfd_boolean (*is_reloc_section) (const char *);
-  enum elf_target_id target_id;
   enum elf_x86_target_os target_os;
   unsigned int sizeof_reloc;
   unsigned int dt_reloc;
@@ -629,7 +628,7 @@ struct elf_x86_plt
 #define is_x86_elf(bfd, htab)                          \
   (bfd_get_flavour (bfd) == bfd_target_elf_flavour     \
    && elf_tdata (bfd) != NULL                          \
-   && elf_object_id (bfd) == (htab)->target_id)
+   && elf_object_id (bfd) == (htab)->elf.hash_table_id)
 
 extern bfd_boolean _bfd_x86_elf_mkobject
   (bfd *);
This page took 0.046269 seconds and 4 git commands to generate.