]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
morello-binutils: Adjust c64_valid_cap_range calculation
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 20 Sep 2021 15:29:01 +0000 (16:29 +0100)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:59:24 +0000 (15:59 -0700)
commit81c4eb38b2f87ab648f536b0d565e8c90286f611
treed01611aa8057a6ba97fdbaa373bf5af8a81f155e
parent139991d392cd5f10e23ff7d6b78e52bc274360d5
morello-binutils: Adjust c64_valid_cap_range calculation

This function had a buggy implementation of rounding a value up to a
given power of 2.  Aligning to a multiple of 16 would align to a
multiple of 32 and so on.

This was observable when linking object files that had very large
objects in them.  The compiler would ensure that these objects are large
enough that they are exactly representable, but the linker would
complain that they are not because the linker asserted extra alignment
than the compiler.

Here we fix the bug, add a few testcases, and adjust an existing
testcase in the area.
bfd/elfnn-aarch64.c
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/emit-relocs-morello-4.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/emit-relocs-morello-4.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/emit-relocs-morello-5.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/emit-relocs-morello-5.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round.d