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

Tamar Christina Tamar.Christina@arm.com
Fri Jan 10 13:53:00 GMT 2020


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.

Thanks,
Tamar

bfd/ChangeLog:

2020-01-10  Tamar Christina  <tamar.christina@arm.com>

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

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb12527.patch
Type: text/x-diff
Size: 712 bytes
Desc: rb12527.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20200110/d19e37a2/attachment.bin>


More information about the Binutils mailing list