Ensure 8-byte alignment for AArch64 stubs.
authorJim Wilson <jimw@sifive.com>
Fri, 2 Mar 2018 10:47:25 +0000 (10:47 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 2 Mar 2018 10:49:20 +0000 (10:49 +0000)
commit9a2ebffd4dd9cffac395177e997f6f47408b4782
treeb877a3c6e100f7c457d4215c69bf0aa93666b0cf
parente7da50fa4b4f770240feda51ba60f6255073e54f
Ensure 8-byte alignment for AArch64 stubs.

PR 22903
bfd * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
and nop instead of 4.
(elfNN_arch64_build_stubs): Add nop after branch.  Increase size by
8 instead of 4.

ld * emultempl/aarch64elf.em (elf${ELFSIZE}_aarch64_add_stub_section):
Give stub_sec 8 byte alignment.
* emulparams/aarch64cloudabi.sh (NOP): Set to 0x1f2003d5.
* emulparams/aarch64elf.sh (NOP): Likewise.
* emulparams/aarch64elf32.sh (NOP): Likewise.
* emulparams/aarch64fbsd.sh (NOP): Likewise.
* emulparams/aarch64linux.sh (NOP): Likewise.
* emulparams/aarch64linux32.sh (NOP): Likewise.
* testsuite/ld-aarch64/erratum835769.d: Adjust for added nop.
* testsuite/ld-aarch64/erratum843419.d: Likewise.
* testsuite/ld-aarch64/farcall-b-defsym.d: Likewise.
* testsuite/ld-aarch64/farcall-b-none-function.d: Likewise.
* testsuite/ld-aarch64/farcall-b-plt.d: Likewise.
* testsuite/ld-aarch64/farcall-b-section.d: Likewise.
* testsuite/ld-aarch64/farcall-b.d: Likewise.
* testsuite/ld-aarch64/farcall-back.d: Likewise.
* testsuite/ld-aarch64/farcall-bl-defsym.d: Likewise.
* testsuite/ld-aarch64/farcall-bl-none-function.d: Likewise.
* testsuite/ld-aarch64/farcall-bl-plt.d: Likewise.
* testsuite/ld-aarch64/farcall-bl-section.d: Likewise.
* testsuite/ld-aarch64/farcall-bl.d: Likewise.
23 files changed:
bfd/ChangeLog
bfd/elfnn-aarch64.c
ld/ChangeLog
ld/emulparams/aarch64cloudabi.sh
ld/emulparams/aarch64elf.sh
ld/emulparams/aarch64elf32.sh
ld/emulparams/aarch64fbsd.sh
ld/emulparams/aarch64linux.sh
ld/emulparams/aarch64linux32.sh
ld/emultempl/aarch64elf.em
ld/testsuite/ld-aarch64/erratum835769.d
ld/testsuite/ld-aarch64/erratum843419.d
ld/testsuite/ld-aarch64/farcall-b-defsym.d
ld/testsuite/ld-aarch64/farcall-b-none-function.d
ld/testsuite/ld-aarch64/farcall-b-plt.d
ld/testsuite/ld-aarch64/farcall-b-section.d
ld/testsuite/ld-aarch64/farcall-b.d
ld/testsuite/ld-aarch64/farcall-back.d
ld/testsuite/ld-aarch64/farcall-bl-defsym.d
ld/testsuite/ld-aarch64/farcall-bl-none-function.d
ld/testsuite/ld-aarch64/farcall-bl-plt.d
ld/testsuite/ld-aarch64/farcall-bl-section.d
ld/testsuite/ld-aarch64/farcall-bl.d