binutils-gdb/ld/testsuite/ld-aarch64/erratum835769-843419.d
Tamar Christina 0db131fb83 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
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
and it fixes the Arm bootstrap regression. But in this case specifying the
correct section class also makes the stub section not be considered by
compress.c.

So I'm partially revert this change so that we don't have to manage the section
manually as implied by SEC_LINKER_CREATED.

bfd/ChangeLog:

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

ld/ChangeLog:

	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.
2020-01-02 14:08:27 +00:00

55 lines
2.1 KiB
Makefile

#source: erratum835769.s
#as:
#ld: --fix-cortex-a53-835769 --fix-cortex-a53-843419=full -e0x400000
#objdump: -dr
#...
Disassembly of section .text:
#...
[0-9a-f]+ <a1ldr>:
[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4, #8\]\!
[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_0>
[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
[0-9a-f]+ <a5ldr>:
[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4, #8\]!
[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_1>
[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
[0-9a-f]+ <a6ldr>:
[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4, #8\]!
[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
[ \t0-9a-f]+:[ \t]+f9400084[ \t]+ldr[ \t]+x4, \[x4\]
[ \t0-9a-f]+:[ \t]+9b031885[ \t]+madd[ \t]+x5, x4, x3, x6
[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
[0-9a-f]+ <a7str>:
[ \t0-9a-f]+:[ \t]+b8408c87[ \t]+ldr[ \t]+w7, \[x4, #8\]!
[ \t0-9a-f]+:[ \t]+1b017c06[ \t]+mul[ \t]+w6, w0, w1
[ \t0-9a-f]+:[ \t]+f9000084[ \t]+str[ \t]+x4, \[x4\]
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_2>
[ \t0-9a-f]+:[ \t]+aa0503e0[ \t]+mov[ \t]+x0, x5
[ \t0-9a-f]+:[ \t]+d65f03c0[ \t]+ret
[ \t0-9a-f]+:[ \t]+d503201f[ \t]+nop
[ \t0-9a-f]+:[ \t]+14000400[ \t]+b[ \t]+[0-9a-f]+ <__erratum_835769_veneer_0\+0xfe8>
[ \t0-9a-f]+:[ \t]+d503201f[ \t]+nop
[0-9a-f]+ <__erratum_835769_veneer_2>:
[ \t0-9a-f]+:[ \t]+9b031885[ \t]+madd[ \t]+x5, x4, x3, x6
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a7str\+0x[0-9a-f]+>
[0-9a-f]+ <__erratum_835769_veneer_1>:
[ \t0-9a-f]+:[ \t]+9ba31845[ \t]+umaddl[ \t]+x5, w2, w3, x6
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a5ldr\+0x[0-9a-f]+>
[0-9a-f]+ <__erratum_835769_veneer_0>:
[ \t0-9a-f]+:[ \t]+9b031845[ \t]+madd[ \t]+x5, x2, x3, x6
[ \t0-9a-f]+:[ \t0-9a-z]+[ \t]+b[ \t]+[0-9a-f]+ <a1ldr\+0x[0-9a-f]+>
#pass