This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
TLS configure check question (why assembly?)
- From: "Steve Ellcey " <sellcey at mips dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Tue, 10 Jul 2012 08:21:01 -0700
- Subject: TLS configure check question (why assembly?)
I have noticed that most (all?) of the architecture specific configure
scripts (sysdeps/*/configure.in, ports/sysdeps/*/configure.in) have
a chunk of assembly code in them to verify that the assembler and linker
support thread local storage.
I was wondering why this code is written in assembly language and not
as a C program that uses TLS. Is it because the C syntax for TLS is
not standardized? Are the only uses of TLS in glibc written in assembly
language?
The reason I ask is that the mips assembly language code that checks
for TLS does not compile if you build glibc with the -mips16 flag and
I wanted to understand why it is in assembly as opposed to C.
Steve Ellcey
sellcey@mips.com