s390: Do not emit orphaned GOT entry for TLS IE to LE transition
Commit 69fc87f180bf introduced TLS support for s390 32-bit and 64-bit.
It defined GOT_TLS_IE_NLT in both elf32-s390.c and elf64-s390.c, but
erroneously assigned it the same value as GOT_TLS_IE in elf64-s390.c.
As a consequence the linker for s390 64-bit erroneously emitted an
orphaned GOT entry when performing TLS Initial Exec (IE) to Local
Exec (LE) transition optimization.
Correct the value of GOT_TLS_IE_NLT in elf64-s390.c. This causes the
liker to actually optimize away the GOT entry when performing IE to LE
transition. While at it add a comment that the suffix NLT denotes
"no literal (pool entry)".
Found while inspecting and cleaning up differences between elf32-s390.c
and elf64-s390.c.
bfd/
* elf32-s390.c (GOT_TLS_IE_NLT): Add comment that NLT denotes
no literal pool entry.
* elf64-s390.c (GOT_TLS_IE_NLT): Likewise. Correct value.
ld/testsuite/
* ld-s390/tlsbin_64.dd: Adjust expected test results.
* ld-s390/tlsbin_64.sd: Likewise.
Fixes: 69fc87f180bf
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
4 files changed