[Bug dynamic-link/28152] New: elf: clang integrated assembler and ld.lld do not support .tls_common
i at maskray dot me
sourceware-bugzilla@sourceware.org
Wed Jul 28 21:00:44 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=28152
Bug ID: 28152
Summary: elf: clang integrated assembler and ld.lld do not
support .tls_common
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
The integrated assembler does not support the obsoleted .tls_common directive
% clang -c -x assembler =(printf '.tls_common x,4,4\n')
/tmp/zsh5QvAWt:1:1: error: unknown directive
.tls_common x,4,4
^
ld.lld doesn't support it (there is no point supporting the obsoleted feature)
% clang -c -x assembler -fno-integrated-as =(printf '.tls_common x,4,4\n') -o
a.o && ld.lld a.o
ld.lld: warning: cannot find entry symbol _start; defaulting to 0x201158
ld.lld: error: a.o has an STT_TLS symbol but doesn't have an SHF_TLS section
elf/tls-macros.h COMMON_INT_DEF uses .tls_common and therefore some tests can
be built/linked with clang or ld.lld
Testing assembling and linking of .tls_common is binutils gas/ld's
responsibility, not glibc's.
https://sourceware.org/pipermail/libc-alpha/2021-July/129451.html (elf: Replace
.tls_common with .tbss definition) can make the tests buildable with clang and
ld.lld
(There is a long way for clang to build glibc itself.
https://sourceware.org/bugzilla/show_bug.cgi?id=27220 (nested functions in
elf/) is the main one.)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list