summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2015-03-24 11:24:50 +0000
committerAndrew Hsieh <andrewhsieh@google.com>2015-03-30 21:39:07 -0700
commit06c6ff7fdadf201a168eca7cf820507225e61d3d (patch)
tree5b141ae2ec84f780b1a17d1924b64047ba60c841 /binutils-2.25/bfd
parent0ce0a704592f94f77c8b2800aee9810891f9e05f (diff)
downloadtoolchain_binutils-06c6ff7fdadf201a168eca7cf820507225e61d3d.zip
toolchain_binutils-06c6ff7fdadf201a168eca7cf820507225e61d3d.tar.gz
toolchain_binutils-06c6ff7fdadf201a168eca7cf820507225e61d3d.tar.bz2
[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. Change-Id: I26e7793af2a8bd6ab57c2b958cec12565d280a8f
Diffstat (limited to 'binutils-2.25/bfd')
-rw-r--r--binutils-2.25/bfd/elfnn-aarch64.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/binutils-2.25/bfd/elfnn-aarch64.c b/binutils-2.25/bfd/elfnn-aarch64.c
index 410cb7e..b10009f 100644
--- a/binutils-2.25/bfd/elfnn-aarch64.c
+++ b/binutils-2.25/bfd/elfnn-aarch64.c
@@ -3481,23 +3481,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;