Only amd64 and i386 are implemented. I do not plan to handle other arches.
This is continuation of D21163/r359634, which handled the alignment for global mode.
Differential D24366
Align initial-exec TLS segments to the p_vaddr % align. kib on Apr 10 2020, 3:08 PM. Authored by Tags None Referenced Files
Subscribers
Details
Only amd64 and i386 are implemented. I do not plan to handle other arches. This is continuation of D21163/r359634, which handled the alignment for global mode.
Diff Detail
Event TimelineComment Actions I've built and installed rtld w/ this change on my main laptop, no issues observed so far. Comment Actions Do we not need an equivalent change to the frustratingly-duplicated parts in lib/libc/gen/tls.c for statically-linked binaries? Initial-exec is unusual but still valid there so long as your linker has statically filled in the relocations for the GOT, and can happen if you disable TLS linker relaxation (or use one of the architectures that can't relax TLS sequences). Comment Actions It would be nice to have, and regardless of static or initial-exec mode. For rtld I handled both. On the other hand, I somewhat doubt that any program where it would matter is linked statically. Still, if you want to provide the patch, go ahead. Otherwise I might return to this sometime.
|