diff options
author | 2024-09-06 14:07:00 +0200 | |
---|---|---|
committer | 2024-09-06 14:07:00 +0200 | |
commit | 7d6e30b4b4e83429cc77222d4fe4d5e8843d8e2b (patch) | |
tree | 9c9c8983e8b6da3e633dca2c5e596eb53def0d17 | |
parent | manual: Safety annotations for clock_gettime, clock_getres (diff) | |
download | glibc-7d6e30b4b4e83429cc77222d4fe4d5e8843d8e2b.tar.xz glibc-7d6e30b4b4e83429cc77222d4fe4d5e8843d8e2b.zip |
stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a
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>
-rw-r--r-- | include/errno.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/errno.h b/include/errno.h index c361a785c2..f0ccaa74dd 100644 --- a/include/errno.h +++ b/include/errno.h @@ -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) |