[PATCH][Binutils][AArch64] Set the correct ELF class for AArch64 stubs (PR/25210)
This fixes PR 25210 by specifying the the correct ELF class for AArch64 stubs.
After doing this the stub section starts behaving like a normal object file
loaded from disk. That is SEC_LINKER_CREATED causes us to have to write the
This flag was added as a fix for PR 24753. I believe that
fix to still be correct as linker created sections don't have a size on disk,
but in this case specifying the correct section class also makes the stub
section not be considered by compress.c.
So I partially revert this change so that we don't have to manage the section
manually as implied by SEC_LINKER_CREATED.
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
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.