https://sourceware.org/bugzilla/show_bug.cgi?id=18276
Bug ID: 18276 Summary: AArch64: readelf, gas do not support TLSLD relocations Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: jingyuuiuc at gmail dot com Clang aarch64 backend generates some TLSLD relocations that readelf and gas do not support. For example, $cat tlsld.c extern int __thread v_ld1a __attribute__ ((tls_model("local-dynamic"))); extern int __thread v_ld1b __attribute__ ((tls_model("local-dynamic"))); int f_ld1 () { return v_ld1a + v_ld1b; } void s (int i) { v_ld1a = v_ld1b = i; } int main(int argc, char** argv) { s(argc); return f_ld1(); } $ clang tlsld.c -fPIC -mllvm -aarch64-elf-ldtls-generation -c -o tlsld.o readelf does not recognize some relocations. $ readelf -r tlsld.o ... 00000000001c 000d00000210 unrecognized: 210 0000000000000000 v_ld1a + 0 000000000020 000d00000212 unrecognized: 212 0000000000000000 v_ld1a + 0 ... 000000000044 000e00000210 unrecognized: 210 0000000000000000 v_ld1b + 0 000000000048 000e00000212 unrecognized: 212 0000000000000000 v_ld1b + 0 ... GAS does not support them either. $ clang tlsld.c -fPIC -mllvm -aarch64-elf-ldtls-generation -S -o tlsld.s $ gcc tlsld.s tlsld.s: Assembler messages: tlsld.s:16: Error: unknown relocation modifier at operand 3 -- `add x0,x0,:dtprel_hi12:v_ld1a' tlsld.s:17: Error: unknown relocation modifier at operand 3 -- `add x0,x0,:dtprel_lo12_nc:v_ld1a' tlsld.s:27: Error: unknown relocation modifier at operand 3 -- `add x8,x0,:dtprel_hi12:v_ld1b' tlsld.s:28: Error: unknown relocation modifier at operand 3 -- `add x8,x8,:dtprel_lo12_nc:v_ld1b' tlsld.s:56: Error: unknown relocation modifier at operand 3 -- `add x0,x0,:dtprel_hi12:v_ld1b' tlsld.s:57: Error: unknown relocation modifier at operand 3 -- `add x0,x0,:dtprel_lo12_nc:v_ld1b' tlsld.s:67: Error: unknown relocation modifier at operand 3 -- `add x8,x0,:dtprel_hi12:v_ld1a' tlsld.s:68: Error: unknown relocation modifier at operand 3 -- `add x8,x8,:dtprel_lo12_nc:v_ld1a' -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils