musl/ldso
Szabolcs Nagy a60b9e0686 fix tls offsets when p_vaddr%p_align != 0 on TLS_ABOVE_TP targets
currently the bfd linker does not seem to create tls segments where
p_vaddr%p_align != 0, but this is valid in ELF and then the runtime
computed tls offset must satisfy

  offset%p_align == (base+p_vaddr)%p_align

and in case of local exec tls (main executable) the smallest such
offset must be used (otherwise it is incompatible with the offset
computed by the static linker). the !TLS_ABOVE_TP case is handled
correctly (the offset is negative then in the formula).

the ldso code for TLS_ABOVE_TP is changed so the static tls offset
of each module satisfies the formula.
2019-05-16 21:48:39 -04:00
..
dlstart.c define and use internal macros for hidden visibility, weak refs 2018-09-05 14:05:14 -04:00
dynlink.c fix tls offsets when p_vaddr%p_align != 0 on TLS_ABOVE_TP targets 2019-05-16 21:48:39 -04:00