Message ID | 20200423192625.21629-2-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/3] signal: Add signum-{generic,arch}.h | expand |
On Thu, 23 Apr 2020, Adhemerval Zanella via Libc-alpha wrote: > MIPS support up to 96 real time signal, instead of current 95. This > increases the NSIG value, however it does not incur in a compat > issue for older programs (which won't access the new element). > The sys_siglist is automatically expanded as well. The fact that you're changing ABI test baselines for existing symbol versions demonstrates that this is not a safe change (you can't change the size of exported data symbols without adding a new symbol version because of issues with copy relocations - this is what the "Symbol `%s' has different size in shared object, consider re-linking" message from the dynamic linker is about). We have the #errlist-compat mechanism in Versions files for having different symbol versions for differently-sized versions of sys_errlist. It looks like sys_siglist has a simpler system involving OLD_SIGLIST_SIZE, OLD2_SIGLIST_SIZE and hardcoded version conditionals in sysdeps/gnu/siglist.c. To make this change, you'll need to add some kind of support for having three compat versions for these symbols (so four versions for them in total), with different sizes, so that existing versions keep their existing sizes. It will also be necessary to update sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist for such a new version in addition to the three ABI baselines changed in this patch.
On 23/04/2020 17:41, Joseph Myers wrote: > On Thu, 23 Apr 2020, Adhemerval Zanella via Libc-alpha wrote: > >> MIPS support up to 96 real time signal, instead of current 95. This >> increases the NSIG value, however it does not incur in a compat >> issue for older programs (which won't access the new element). >> The sys_siglist is automatically expanded as well. > > The fact that you're changing ABI test baselines for existing symbol > versions demonstrates that this is not a safe change (you can't change the > size of exported data symbols without adding a new symbol version because > of issues with copy relocations - this is what the "Symbol `%s' has > different size in shared object, consider re-linking" message from the > dynamic linker is about). Indeed, I forgot about copy relocations and that it is possible to link new applications against sys_errlist. > > We have the #errlist-compat mechanism in Versions files for having > different symbol versions for differently-sized versions of sys_errlist. > It looks like sys_siglist has a simpler system involving OLD_SIGLIST_SIZE, > OLD2_SIGLIST_SIZE and hardcoded version conditionals in > sysdeps/gnu/siglist.c. To make this change, you'll need to add some kind > of support for having three compat versions for these symbols (so four > versions for them in total), with different sizes, so that existing > versions keep their existing sizes. Ack, I will update the patch. > > It will also be necessary to update > sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist for such a new > version in addition to the three ABI baselines changed in this patch. > Ack.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h index 36b1d62e35..a9d5f41e66 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h +++ b/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h @@ -60,6 +60,6 @@ /* By default no real-time signals are supported. */ #define __SIGRTMIN 32 -#define __SIGRTMAX 127 +#define __SIGRTMAX 128 #endif /* <signal.h> included. */ diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index a6f99a7369..e0568438b6 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2077,7 +2077,7 @@ GLIBC_2.3.2 pthread_cond_signal F GLIBC_2.3.2 pthread_cond_timedwait F GLIBC_2.3.2 pthread_cond_wait F GLIBC_2.3.2 strptime_l F -GLIBC_2.3.3 _sys_siglist D 0x200 +GLIBC_2.3.3 _sys_siglist D 0x204 GLIBC_2.3.3 gnu_dev_major F GLIBC_2.3.3 gnu_dev_makedev F GLIBC_2.3.3 gnu_dev_minor F @@ -2095,8 +2095,8 @@ GLIBC_2.3.3 remap_file_pages F GLIBC_2.3.3 sched_getaffinity F GLIBC_2.3.3 sched_setaffinity F GLIBC_2.3.3 semtimedop F -GLIBC_2.3.3 sys_sigabbrev D 0x200 -GLIBC_2.3.3 sys_siglist D 0x200 +GLIBC_2.3.3 sys_sigabbrev D 0x204 +GLIBC_2.3.3 sys_siglist D 0x204 GLIBC_2.3.4 __chk_fail F GLIBC_2.3.4 __fprintf_chk F GLIBC_2.3.4 __gets_chk F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 99965cfb0f..70e2e9a8c5 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2083,7 +2083,7 @@ GLIBC_2.3.2 pthread_cond_signal F GLIBC_2.3.2 pthread_cond_timedwait F GLIBC_2.3.2 pthread_cond_wait F GLIBC_2.3.2 strptime_l F -GLIBC_2.3.3 _sys_siglist D 0x200 +GLIBC_2.3.3 _sys_siglist D 0x204 GLIBC_2.3.3 gnu_dev_major F GLIBC_2.3.3 gnu_dev_makedev F GLIBC_2.3.3 gnu_dev_minor F @@ -2101,8 +2101,8 @@ GLIBC_2.3.3 remap_file_pages F GLIBC_2.3.3 sched_getaffinity F GLIBC_2.3.3 sched_setaffinity F GLIBC_2.3.3 semtimedop F -GLIBC_2.3.3 sys_sigabbrev D 0x200 -GLIBC_2.3.3 sys_siglist D 0x200 +GLIBC_2.3.3 sys_sigabbrev D 0x204 +GLIBC_2.3.3 sys_siglist D 0x204 GLIBC_2.3.4 __chk_fail F GLIBC_2.3.4 __fprintf_chk F GLIBC_2.3.4 __gets_chk F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist index 2c8bafc669..4e0f236115 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist @@ -2076,7 +2076,7 @@ GLIBC_2.3.2 pthread_cond_signal F GLIBC_2.3.2 pthread_cond_timedwait F GLIBC_2.3.2 pthread_cond_wait F GLIBC_2.3.2 strptime_l F -GLIBC_2.3.3 _sys_siglist D 0x400 +GLIBC_2.3.3 _sys_siglist D 0x408 GLIBC_2.3.3 gnu_dev_major F GLIBC_2.3.3 gnu_dev_makedev F GLIBC_2.3.3 gnu_dev_minor F @@ -2095,8 +2095,8 @@ GLIBC_2.3.3 sched_setaffinity F GLIBC_2.3.3 semtimedop F GLIBC_2.3.3 strtoll_l F GLIBC_2.3.3 strtoull_l F -GLIBC_2.3.3 sys_sigabbrev D 0x400 -GLIBC_2.3.3 sys_siglist D 0x400 +GLIBC_2.3.3 sys_sigabbrev D 0x408 +GLIBC_2.3.3 sys_siglist D 0x408 GLIBC_2.3.4 __chk_fail F GLIBC_2.3.4 __fprintf_chk F GLIBC_2.3.4 __gets_chk F