abi-aa icon indicating copy to clipboard operation
abi-aa copied to clipboard

Define behaviour of GOT generating TLS relocations with addends.

Open smithp35 opened this issue 1 year ago • 0 comments

Issue https://github.com/ARM-software/abi-aa/issues/217 which was fixed by https://github.com/ARM-software/abi-aa/pull/272 accounted for the case where the ABI was out of sync with both GNU ld and LLD with respect to GOT generating relocations with addends.

https://github.com/ARM-software/abi-aa/pull/272 didn't account for TLS relocations which can also generate GOT entries for S + A although lld and GNU ld will only support the case where A == 0.

Document this in the ABI.

It will also be helpful to document the relaxation that both GNU ld and LLD do for non-premptible symbol definitions. In this case a GOT generating relocation for S produces a dynamic relocation to the null-symbol (ELF symbol index 0) + A where A is the offset of S from the start of the TLS block.

Will post a PR shortly, hopefully tomorrow.

smithp35 avatar Nov 06 '24 18:11 smithp35