[PATCH] Use __attribute__((tls_model(""))), add hidden aliases to TLS vars
Roland McGrath
roland@redhat.com
Tue Oct 15 20:04:00 GMT 2002
Cool, I'll put that in. I was going to get to that myself but hadn't yet
installed the compiler that supports it.
It occurs to me you could use libc_hidden_proto instead of macros.
But that is uglier in the asm, and both ways do the same thing.
One thing that concerns me is if a program (erroneously) does
"__thread int errno;" (sans extern) or suchlike. Then the program
and libpthread will use its errno, but libc will only set __libc_errno.
It would be nice if this produced a link-time error like a multiple
definition with a non-shared object would. But AFAIK no .so symbol will
ever produce a multiple definition error. Perhaps we could do some hack in
the linker script.
More information about the Libc-hacker
mailing list