]> sourceware.org Git - glibc.git/commitdiff
stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a
authorFlorian Weimer <fweimer@redhat.com>
Fri, 6 Sep 2024 12:07:00 +0000 (14:07 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 6 Sep 2024 12:07:00 +0000 (14:07 +0200)
Using TLS directly introduces a GLIBC_PRIVATE ABI dependency
into libc_nonshared.a, and thus indirectly into applications.
Adding the !defined LIBC_NONSHARED condition deactivates direct
TLS access, and libc_nonshared.a code switches to using
__errno_location, like application code.

Currently, this has no effect because there is no code in
libc_nonshared.a that accesses errno.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
include/errno.h

index c361a785c24b928fd3f6b58ef11090b0efb9390b..f0ccaa74dd8bebed83e4adfbf301339efeae3cdb 100644 (file)
@@ -20,7 +20,7 @@
 #  define errno rtld_errno
 extern int rtld_errno attribute_hidden;
 
-# elif IS_IN_LIB && !IS_IN (rtld)
+# elif IS_IN_LIB && !IS_IN (rtld) && !defined LIBC_NONSHARED
 
 #  undef  errno
 #  if IS_IN (libc)
This page took 0.038294 seconds and 5 git commands to generate.