aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2020-01-10 13:48:57 +0000
committerTamar Christina <tamar.christina@arm.com>2020-01-10 13:51:08 +0000
commit8cd0e5e93145699736a370b271ff03f3f41670b0 (patch)
tree3ebe13adc19996dc2946c7372922d5eb51c8d7a6 /bfd
parentec4181f289f167663ed32483340d249a802321e5 (diff)
downloadgdb-8cd0e5e93145699736a370b271ff03f3f41670b0.zip
gdb-8cd0e5e93145699736a370b271ff03f3f41670b0.tar.gz
gdb-8cd0e5e93145699736a370b271ff03f3f41670b0.tar.bz2
AArch64: Revert setting of elf class in linker stub.
This changes the fix to PR 25210 by removing the ELF class change. As it turns out the correct change was only the change in compress.c. Everything else is unneeded and setting the elf class is making the linker behave very oddly under LTO. The first stub is correctly written out but for the rest the suddenly don't have a pointer to the stub section anymore. This caused SPEC to fail as the program would branch to the stub and it wouldn't be filled in. Committed to master under the trivial rule as this is partially reverting a previous commit. bfd/ChangeLog: PR 25210 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfnn-aarch64.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 68b1519..2aba654 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-10 Tamar Christina <tamar.christina@arm.com>
+
+ PR 25210
+ * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
+
2020-01-10 Alan Modra <amodra@gmail.com>
* coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 756ffeb..5fabcd8 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3177,10 +3177,6 @@ _bfd_aarch64_create_stub_section (asection *section,
if (s_name == NULL)
return NULL;
- /* PR 25210. Set the right class on the stub_bfd. */
- elf_elfheader (htab->stub_bfd)->e_ident[EI_CLASS] = ELFCLASSNN;
- BFD_ASSERT (ELFCLASSNN == get_elf_backend_data (htab->stub_bfd)->s->elfclass);
-
memcpy (s_name, section->name, namelen);
memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
return (*htab->add_stub_section) (s_name, section);