]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Assign correct size on Morello TLS relocations
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Mar 2022 18:10:51 +0000 (18:10 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Mar 2022 18:10:51 +0000 (18:10 +0000)
commitbf3eaebd3420930c6454cfafe6a636d57599c318
tree40b5e70da5b84a53ccdb59dd810ae5134a5247c4
parente4f0a01cbda77a0ea9ddb7aa1ce19244ca311b82
Assign correct size on Morello TLS relocations

The previous code was not actually using the size of a symbol when the
symbol was in the hash table.  This meant that our TLS relaxations
created an instruction sequence with bounds of zero so that the GCC TLS
instruction sequence eventually ended up giving a length-zero
capability.

Also handle extra size of pointers in TCB for c64.  For purecap we have
16 byte pointers.  Hence the TCB is 32 bytes.  This was not yet handled
in our relaxations.

Here we determine whether to use a 32 or 16 byte TCB based on the flags
of the current BFD (i.e. whether this is a purecap binary that we're
creating).

Testcases are updated to account for the fact that the length
of the capability to the symbol itself is now sometimes non-zero and for
the different offset required into the TLS block for modules loaded at
startup time.
bfd/elfnn-aarch64.c
ld/testsuite/ld-aarch64/morello-tlsdesc-static.d
ld/testsuite/ld-aarch64/morello-tlsdesc-staticpie.d