aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-04-24 11:09:00 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-07-07 14:10:58 -0300
commitb1ccfc061feee9ce616444ded8e1cd5acf9fa97f (patch)
treefc6cf960f68245bcbf045df47955c253a94504d8 /sysdeps/mach
parentsignal: Add signum-{generic,arch}.h (diff)
downloadglibc-b1ccfc061feee9ce616444ded8e1cd5acf9fa97f.tar.gz
glibc-b1ccfc061feee9ce616444ded8e1cd5acf9fa97f.tar.bz2
glibc-b1ccfc061feee9ce616444ded8e1cd5acf9fa97f.zip
signal: Move sys_siglist to a compat symbol
The symbol was deprecated by strsignal and its usage imposes issues such as copy relocations. Its internal name is changed to __sys_siglist and __sys_sigabbrev to avoid static linking usage. The compat code is also refactored, since both Linux and Hurd usage the same strategy: export the same array with different object sizes. The libSegfault change avoids calling strsignal on the SIGFAULT signal handler (the current usage is already sketchy, adding a call that potentially issue locale internal function is even sketchier). Checked on x86_64-linux-gnu and i686-linux-gnu. I also run a check-abi on all affected platforms. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/siglist-compat.c (renamed from sysdeps/mach/hurd/siglist.h)13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/siglist.h b/sysdeps/mach/hurd/siglist-compat.c
index 2eee091610..c93f12366b 100644
--- a/sysdeps/mach/hurd/siglist.h
+++ b/sysdeps/mach/hurd/siglist-compat.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
+/* Compatibility signal numbers and their names symbols. Hurd version.
+ Copyright (C) 1997-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,8 +16,12 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-/* This file is included multiple times. */
+#include <siglist-compat.h>
-#include_next <siglist.h> /* Get the canonical list. */
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+DEFINE_COMPAT_SIGLIST (33, GLIBC_2_0)
+#endif
-#define OLD_SIGLIST_SIZE 33 /* For GLIBC_2.0 binary compatibility. */
+#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_32)
+DEFINE_COMPAT_SIGLIST (NSIG, GLIBC_2_1)
+#endif