https://llvm.org/bugs/show_bug.cgi?id=30984
Bug ID: 30984
Summary: [ELF] - Relocatable output incorrectly handles
__tls_get_addr
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
cad/iverilog fails to link under FreeBSD with next error:
/usr/bin/ld: error: relocation R_X86_64_PLT32 cannot refer to absolute symbol
__tls_get_addr
Seems we have a problem with -r.
getp.o file has:
9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __tls_get_addr
After running -r LLD converts it to hidden absolute:
root@freebsd:/usr/ports/cad/iverilog # ld -r -o test getp.o
root@freebsd:/usr/ports/cad/iverilog # readelf -s test
Symbol table '.symtab' contains 11 entries:
Num: Value Size Type Bind Vis Ndx Name
...
8: 0000000000000000 0 NOTYPE GLOBAL HIDDEN ABS __tls_get_addr
ld.bfd in the same sutuation leaves it as is:
root@freebsd:/usr/ports/cad/iverilog # ld.bfd -r -o test getp.o
root@freebsd:/usr/ports/cad/iverilog # readelf -s test
Symbol table '.symtab' contains 16 entries:
Num: Value Size Type Bind Vis Ndx Name
...
11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __tls_get_addr
I am going to fix that.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs