| Issue |
203435
|
| Summary |
[Aarch64 LLD] unknown relocation (550) linking -mtls-size=12 local-exec TLS
|
| Labels |
lld
|
| Assignees |
|
| Reporter |
henderkes
|
```c
static __thread void *tls_probe __attribute__((tls_model("local-exec")));
void _start(void) { tls_probe = &tls_probe; }
```
```bash
$ clang -mtls-size=12 -fpie -c tls.c -o tls.o # OK
$ llvm-readobj -r tls.o | grep -i tprel
0x4 R_AARCH64_TLSLE_ADD_TPREL_LO12 tls_probe 0x0
$ clang -mtls-size=12 -fpie -pie -nostdlib -fuse-ld=lld tls.c -o tls.elf
ld.lld: error: tls.o:(function _start: .text+0x4): unknown relocation (550) against symbol tls_probe
$ clang -fpie -pie -nostdlib -fuse-ld=lld tls.c -o tls.elf # ok, no mtls-size
$ clang -mtls-size=12 -fpie -pie -nostdlib tls.c -o tls.elf # ok, gnu ld
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs