[PATCH] D64930: [ELF][AArch64] Allow PT_LOAD to have overlapping p_offset ranges

Szabolcs Nagy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 02:14:21 PDT 2019


nsz added a comment.



In D64930#1597590 <https://reviews.llvm.org/D64930#1597590>, @peter.smith wrote:

> Will be worth mentioning that this is dependent on D64906 <https://reviews.llvm.org/D64906> and D64903 <https://reviews.llvm.org/D64903>, I could guess at D64903 <https://reviews.llvm.org/D64903> but basic-aarch64.s didn't apply cleanly without D64903 <https://reviews.llvm.org/D64903>. I successfully did a 2 stage bootstrap of clang with ninja check-all on a native aarch64 machine and made a quick test to check the TP relative relocation. I struggled a bit to understand the description and the comments though. In particular the use of GAP_ABOVE_TP instead of TCB_SIZE, it also wasn't clear where the alignment calculation had come from. I've made a few suggestions.


it seems the description is based on the code in musl.

i think the "TCB" wording is a mistake in the original IA-64 sysv abi (and Drepper's tls paper based on it) which documents implementation internals (16bytes "thread control block" after the tp), that is not abi and thus inappropriate in an abi document. the tls abi is just 16 bytes gap reserved after tp for implementation internal use (e.g. in musl it is unused).

i think using "TCB_SIZE" is acceptable in a linker given the tls abi documentation, but in musl that would be confusing since the tcb is elsewhere. (i think tcb is confusing in glibc too since tcb refers to the the entire pthread struct as well which is below the tp, so with tls variant 1 there are now two different things called tcb).


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64930/new/

https://reviews.llvm.org/D64930





More information about the llvm-commits mailing list