This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [AArch64] Use _bfd_aarch64_add_stub_entry_in_group.


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

commit e572930b96d8080ec80e65cfe85aaa8c4f7b2603
Author: Marcus Shawcroft <marcus.shawcroft@arm.com>
Date:   Tue Mar 24 11:24:50 2015 +0000

    [AArch64] Use _bfd_aarch64_add_stub_entry_in_group.
    
    Adjust the 835769 workaround code to use
    _bfd_aarch64_add_stub_entry_in_group rather than inspect the
    underlying section_group structure directly.

Diff:
---
 bfd/ChangeLog       |  5 +++++
 bfd/elfnn-aarch64.c | 20 +++++---------------
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 512452c..0f462ea 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
+	_bfd_aarch64_add_stub_entry_in_group.
+
 2015-03-24  Alan Modra  <amodra@gmail.com>
 
 	* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 64b1ee4..d4e6ba4 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3508,23 +3508,13 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
 	  struct elf_aarch64_stub_hash_entry *stub_entry;
 	  char *stub_name = erratum_835769_fixes[i].stub_name;
 	  asection *section = erratum_835769_fixes[i].section;
-	  unsigned int section_id = erratum_835769_fixes[i].section->id;
-	  asection *link_sec = htab->stub_group[section_id].link_sec;
-	  asection *stub_sec = htab->stub_group[section_id].stub_sec;
 
-	  stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table,
-						 stub_name, TRUE, FALSE);
-	  if (stub_entry == NULL)
-	    {
-	      (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-				     section->owner,
-				     stub_name);
-	      return FALSE;
-	    }
+	  stub_entry = _bfd_aarch64_add_stub_entry_in_group (stub_name,
+							     section,
+							     htab);
+	  if (! stub_entry)
+	    return FALSE;
 
-	  stub_entry->stub_sec = stub_sec;
-	  stub_entry->stub_offset = 0;
-	  stub_entry->id_sec = link_sec;
 	  stub_entry->stub_type = erratum_835769_fixes[i].stub_type;
 	  stub_entry->target_section = section;
 	  stub_entry->target_value = erratum_835769_fixes[i].offset;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]