[PATCH][Binutils][AArch64] Set the correct ELF class for AArch64 stubs (PR/25210)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][Binutils][AArch64] Set the correct ELF class for AArch64 stubs (PR/25210)

Tamar Christina-2
Hi All,

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
section manually.

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
  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.

Ok for master? and for backport to binutils-2.33?

Thanks,
Tamar

bfd/ChangeLog:

2019-12-31  Tamar Christina  <[hidden email]>

        PR 25210
        PR 24753
        * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.

ld/ChangeLog:

2019-12-31  Tamar Christina  <[hidden email]>

        PR 25210
        PR 24753
        * emultempl/aarch64elf.em (elf${ELFSIZE}_aarch64_add_stub_section):
        Remove SEC_LINKER_CREATED.
        * testsuite/ld-aarch64/aarch64-elf.exp: Add erratum835769-843419.
        * testsuite/ld-aarch64/erratum835769-843419.d: New test.

--

rb12490.patch (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH][Binutils][AArch64] Set the correct ELF class for AArch64 stubs (PR/25210)

Nick Clifton
Hi Tamar,

> Ok for master? and for backport to binutils-2.33?

Approved for both, please apply.

Cheers
  Nick