[COMMITTED][PATCH][Binutils][AArch64] Revert setting of elf class in linker stub.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[COMMITTED][PATCH][Binutils][AArch64] Revert setting of elf class in linker stub.

Tamar Christina-2
Hi All,

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.

build on native hardware and regtested on
  aarch64-none-elf, aarch64-none-elf (32 bit host),
  aarch64-none-linux-gnu, aarch64-none-linux-gnu (32 bit host),
  arm-none-eabi, arm-none-eabi (32 bit host),
  arm-none-linux-gnueabihf, arm-none-linux-gnueabihf (32 bit host)

Cross-compiled and regtested on
  aarch64-none-linux-gnu, aarch64_be-none-linux-gnu,
  arm-none-eabi, armeb-none-eabi, arm-wince-pe

and no issues.

Also performed a full toolchain build for aarch64-none-linux-gnu to confirm
that this doesn't re-introduce the issue mentioned in PR 24753 and also did a SPEC2017
run to verify that the errata workarounds are correct again.

Committed to master under the trivial rule as this is partially reverting a previous commit.



2020-01-10  Tamar Christina  <[hidden email]>

        PR 25210
        * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.


rb12527.patch (984 bytes) Download Attachment