aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-aarch64.c
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-28 00:17:22 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2015-03-24 14:10:43 +0000
commit30068a6d2da1ba4b0248a270c7c958ef24a80416 (patch)
treeeda87258cb75d04ba89ac0b40313cafedb1cea66 /bfd/elfnn-aarch64.c
parent369f6daa21bf33a09ef67b002e4cec3595eddfe7 (diff)
downloadgdb-30068a6d2da1ba4b0248a270c7c958ef24a80416.zip
gdb-30068a6d2da1ba4b0248a270c7c958ef24a80416.tar.gz
gdb-30068a6d2da1ba4b0248a270c7c958ef24a80416.tar.bz2
[AArch64] Refactor section_group[] representation.
Change the behaviour of section_group[] such that .stub_sec points to the stub section attached to the indexed section rather than the stub section attached to the link_section pointed to be the index section. This provides a mechanism to get to the stub section following any input section. While still allowing the section grouping mechanism to find the section group stub section associated with an input section by first following the link_sec pointer.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r--bfd/elfnn-aarch64.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 14b4057..d5c1fd5 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -2350,21 +2350,12 @@ _bfd_aarch64_create_or_find_stub_sec (asection *section,
link_sec = htab->stub_group[section->id].link_sec;
BFD_ASSERT (link_sec != NULL);
- stub_sec = htab->stub_group[section->id].stub_sec;
-
+ stub_sec = htab->stub_group[link_sec->id].stub_sec;
if (stub_sec == NULL)
{
- stub_sec = htab->stub_group[link_sec->id].stub_sec;
- if (stub_sec == NULL)
- {
- stub_sec = _bfd_aarch64_create_stub_section (link_sec, htab);
- if (stub_sec == NULL)
- return NULL;
- htab->stub_group[link_sec->id].stub_sec = stub_sec;
- }
- htab->stub_group[section->id].stub_sec = stub_sec;
+ stub_sec = _bfd_aarch64_create_stub_section (link_sec, htab);
+ htab->stub_group[link_sec->id].stub_sec = stub_sec;
}
-
return stub_sec;
}