[binutils-gdb][ld][AArch64] Fix group_sections algorithm [PR25665]

Nick Clifton nickc@redhat.com
Mon May 4 14:58:34 GMT 2020


Hi Wilco,

> 2020-04-27  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	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.

[nit-pick: The above should really be two changelog entries, one
for the bfd/ directory and one for the ld/directory].

Approved and applied.

Note however that there were a couple of problems with the new test:

> +0000000000400078 <_start>:

This start address only works for aarch64-linux-gnu toolchains,  other
configurations, eg aarch64-elf, use a different default start address.

> + 440007c:	d503201f 	.word	0xd503201f

This disassembly only works for little-endian aarch64 configurations.
If you configure a big-endian toolchain then they are byte swapped.

> + 4400088:	90fe0010 	adrp	x16, 400000 <_start\-0x78>

Another aarch64-linux-gnu dependency.  In bare metal toolchains this
offset is displayed as "_stack+0x378000"

I fixed these problems, but in the future it would be great if you could
check with more than one configuration of the aarch64 binutils.

Cheers
  Nick



More information about the Binutils mailing list