From b1ccfc061feee9ce616444ded8e1cd5acf9fa97f Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 24 Apr 2020 11:09:00 -0300 Subject: 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 --- sysdeps/unix/sysv/linux/siglist-compat.c | 31 +++++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/siglist.h | 24 ------------------------ 2 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/siglist-compat.c delete mode 100644 sysdeps/unix/sysv/linux/siglist.h (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/siglist-compat.c b/sysdeps/unix/sysv/linux/siglist-compat.c new file mode 100644 index 0000000..c322326 --- /dev/null +++ b/sysdeps/unix/sysv/linux/siglist-compat.c @@ -0,0 +1,31 @@ +/* Compatibility signal numbers and their names symbols. Linux 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +DEFINE_COMPAT_SIGLIST (32, GLIBC_2_0) +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) +DEFINE_COMPAT_SIGLIST (64, GLIBC_2_1) +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_32) +DEFINE_COMPAT_SIGLIST (NSIG, GLIBC_2_3_3) +#endif diff --git a/sysdeps/unix/sysv/linux/siglist.h b/sysdeps/unix/sysv/linux/siglist.h deleted file mode 100644 index 6ff2c61..0000000 --- a/sysdeps/unix/sysv/linux/siglist.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1996-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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* This file is included multiple times. */ - -#include_next /* Get the canonical list. */ - -#define OLD_SIGLIST_SIZE 32 /* For GLIBC_2.0 binary compatibility. */ - -#define OLD2_SIGLIST_SIZE 64 /* For GLIBC_2.1 binary compatibility. */ -- cgit v1.1