From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kwanyin.sergiodj.net (kwanyin.sergiodj.net [158.69.185.54]) by sourceware.org (Postfix) with ESMTPS id 49F4A3890434 for ; Fri, 5 Jun 2020 08:36:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 49F4A3890434 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] x86: Remove target_id from elf_x86_link_hash_table From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 05 Jun 2020 04:36:58 -0400 X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-testers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-testers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 08:37:01 -0000 *** TEST RESULTS FOR COMMIT add5f777decf9257f46c98dc2aacedb52a3d65e6 *** commit add5f777decf9257f46c98dc2aacedb52a3d65e6 Author: H.J. Lu AuthorDate: Thu Jun 4 09:56:25 2020 -0700 Commit: H.J. Lu CommitDate: Thu Jun 4 09:56:25 2020 -0700 x86: Remove target_id from elf_x86_link_hash_table 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. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 13a3ed180b..fb87353fe1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2020-06-04 H.J. Lu + + * 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 PR ld/26080 diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index 035b5c5c64..d796292562 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -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, diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index c717cd16e5..de4e78f443 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -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 *);