[binutils-gdb] Re: score and mmix target_id

Alan Modra amodra@sourceware.org
Tue Dec 17 04:29:46 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a030e43267f37681961866760156d74b4e9e30d6

commit a030e43267f37681961866760156d74b4e9e30d6
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Dec 17 14:29:57 2024 +1030

    Re: score and mmix target_id
    
    elflink.c checks elf_object_id(ibfd) == elf_hash_table_id(hash_table)
    in a number of places.  Make them match.

Diff:
---
 bfd/elf32-score.c | 2 +-
 bfd/elflink.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 03ea71d150e..76e8761cf90 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -4365,7 +4365,7 @@ elf32_score_link_hash_table_create (bfd *abfd)
 
   if (!_bfd_elf_link_hash_table_init (ret, abfd, score_elf_link_hash_newfunc,
 				      sizeof (struct score_elf_link_hash_entry),
-				      GENERIC_ELF_DATA))
+				      SCORE_ELF_DATA))
     {
       free (ret);
       return NULL;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ef159dafd55..2b9e8b9ea30 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8354,7 +8354,7 @@ _bfd_elf_link_hash_table_create (bfd *abfd)
 
   if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc,
 				       sizeof (struct elf_link_hash_entry),
-				       GENERIC_ELF_DATA))
+				       get_elf_backend_data (abfd)->target_id))
     {
       free (ret);
       return NULL;


More information about the Binutils-cvs mailing list