public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28152] New: elf: clang integrated assembler and ld.lld do not support .tls_common
@ 2021-07-28 21:00 i at maskray dot me
  2021-07-28 21:02 ` [Bug dynamic-link/28152] " i at maskray dot me
  2021-08-16 17:08 ` i at maskray dot me
  0 siblings, 2 replies; 3+ messages in thread
From: i at maskray dot me @ 2021-07-28 21:00 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug dynamic-link/28152] elf: clang integrated assembler and ld.lld do not support .tls_common
  2021-07-28 21:00 [Bug dynamic-link/28152] New: elf: clang integrated assembler and ld.lld do not support .tls_common i at maskray dot me
@ 2021-07-28 21:02 ` i at maskray dot me
  2021-08-16 17:08 ` i at maskray dot me
  1 sibling, 0 replies; 3+ messages in thread
From: i at maskray dot me @ 2021-07-28 21:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28152

--- Comment #1 from Fangrui Song <i at maskray dot me> ---
> can be built/linked with clang or ld.lld

can => cannot


.tls_common and .tbss definition are almost identical after linking. So glibc
tests can just use .tbss

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug dynamic-link/28152] elf: clang integrated assembler and ld.lld do not support .tls_common
  2021-07-28 21:00 [Bug dynamic-link/28152] New: elf: clang integrated assembler and ld.lld do not support .tls_common i at maskray dot me
  2021-07-28 21:02 ` [Bug dynamic-link/28152] " i at maskray dot me
@ 2021-08-16 17:08 ` i at maskray dot me
  1 sibling, 0 replies; 3+ messages in thread
From: i at maskray dot me @ 2021-08-16 17:08 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28152

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Fangrui Song <i at maskray dot me> ---
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=33c50ef42878b07ee6ead8b3f1a81d8c2c74697c
(elf: Drop elf/tls-macros.h in favor of __thread and tls_model attributes [BZ
#28152] [BZ #28205])

Fixed for 2.35.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-16 17:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 21:00 [Bug dynamic-link/28152] New: elf: clang integrated assembler and ld.lld do not support .tls_common i at maskray dot me
2021-07-28 21:02 ` [Bug dynamic-link/28152] " i at maskray dot me
2021-08-16 17:08 ` i at maskray dot me

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).