diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2020-05-04 15:51:56 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-05-04 15:51:56 +0100 |
commit | cff69cf4cf97e1eb4c2cca8e985e403b1a97c059 (patch) | |
tree | e6da7c4ad676bba189e360caf912b069ed876376 /ld/testsuite | |
parent | 070b775f03ebdab6d0d007787fe19b916af4439c (diff) | |
download | gdb-cff69cf4cf97e1eb4c2cca8e985e403b1a97c059.zip gdb-cff69cf4cf97e1eb4c2cca8e985e403b1a97c059.tar.gz gdb-cff69cf4cf97e1eb4c2cca8e985e403b1a97c059.tar.bz2 |
[binutils-gdb][ld][AArch64] Fix group_sections algorithm
PR ld/25665
* bfd/elfnn-aarch64.c (group_sections): Copy implementation
from elf32-arm.c.
* testsuite/ld-aarch64/aarch64-elf.exp: Add new test.
* testsuite/ld-aarch64/farcall-group.s: New large group test.
* testsuite/ld-aarch64/farcall-group.d: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-aarch64/aarch64-elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/farcall-group.d | 30 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/farcall-group.s | 15 |
3 files changed, 46 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp index fefc751..297a3e9 100644 --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp @@ -262,6 +262,7 @@ run_dump_test "farcall-b-none-function" run_dump_test "farcall-bl-none-function" run_dump_test "farcall-b-section" run_dump_test "farcall-bl-section" +run_dump_test "farcall-group" run_dump_test "tls-relax-all" run_dump_test "tls-relax-all-ilp32" diff --git a/ld/testsuite/ld-aarch64/farcall-group.d b/ld/testsuite/ld-aarch64/farcall-group.d new file mode 100644 index 0000000..365b6b9 --- /dev/null +++ b/ld/testsuite/ld-aarch64/farcall-group.d @@ -0,0 +1,30 @@ +#name: aarch64-farcall-group +#source: farcall-group.s +#as: +#ld: -Ttext=0x400078 +#objdump: -dr +#... + +Disassembly of section .text: + +0000000000400078 <_start>: + 400078: 95000008 bl 4400098 <__end_veneer> + ... + 440007c: (d503201f|1f2003d5) .word 0x(d503201f|1f2003d5) + 4400080: 1400000e b 44000b8 <__end_veneer\+0x20> + 4400084: d503201f nop + +0000000004400088 <___start_veneer>: + 4400088: 90fe0010 adrp x16, 400000 <.*> + 440008c: 9101e210 add x16, x16, #0x78 + 4400090: d61f0200 br x16 + 4400094: 00000000 udf #0 + +0000000004400098 <__end_veneer>: + 4400098: 90020010 adrp x16, 8400000 <__end_veneer\+0x3ffff68> + 440009c: 9102e210 add x16, x16, #0xb8 + 44000a0: d61f0200 br x16 + ... + +00000000084000b8 <end>: + 84000b8: 96fffff4 bl 4400088 <___start_veneer> diff --git a/ld/testsuite/ld-aarch64/farcall-group.s b/ld/testsuite/ld-aarch64/farcall-group.s new file mode 100644 index 0000000..7fe8f94 --- /dev/null +++ b/ld/testsuite/ld-aarch64/farcall-group.s @@ -0,0 +1,15 @@ + .section .text.t1 + .global _start + .global end +_start: + bl end + + .section .text.t2 + .zero 64 * 1024 * 1024 + + .section .text.t3 + .zero 64 * 1024 * 1024 + + .section .text.t4 +end: + bl _start |