apply hidden visibility to sigreturn code fragments
authorRich Felker <dalias@aerifal.cx>
Tue, 11 Sep 2018 15:57:31 +0000 (11:57 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 18:34:34 +0000 (14:34 -0400)
these were overlooked in the declarations overhaul work because they
are not properly declared, and the current framework even allows their
declared types to vary by arch. at some point this should be cleaned
up, but I'm not sure what the right way would be.

21 files changed:
arch/mips/ksigaction.h
arch/mips64/ksigaction.h
arch/mipsn32/ksigaction.h
arch/sh/ksigaction.h
arch/x32/ksigaction.h
arch/x86_64/ksigaction.h
src/internal/ksigaction.h
src/signal/aarch64/restore.s
src/signal/arm/restore.s
src/signal/i386/restore.s
src/signal/microblaze/restore.s
src/signal/mips/restore.s
src/signal/mips64/restore.s
src/signal/mipsn32/restore.s
src/signal/powerpc/restore.s
src/signal/powerpc64/restore.s
src/signal/restore.c
src/signal/s390x/restore.s
src/signal/sh/restore.s
src/signal/x32/restore.s
src/signal/x86_64/restore.s

index 3127f7c..63fdfab 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        unsigned flags;
        void (*handler)(int);
@@ -8,4 +10,4 @@ struct k_sigaction {
        void (*restorer)();
 };
 
-void __restore(), __restore_rt();
+hidden void __restore(), __restore_rt();
index 55ba18e..c16e473 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        unsigned flags;
        void (*handler)(int);
@@ -5,4 +7,4 @@ struct k_sigaction {
        void (*restorer)();
 };
 
-void __restore(), __restore_rt();
+hidden void __restore(), __restore_rt();
index 9969e3b..b565f1f 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        unsigned flags;
        void (*handler)(int);
@@ -5,4 +7,4 @@ struct k_sigaction {
        void (*restorer)();
 };
 
-void __restore(), __restore_rt();
+hidden void __restore(), __restore_rt();
index 0c652be..714ae61 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        void (*handler)(int);
        unsigned long flags;
@@ -5,4 +7,4 @@ struct k_sigaction {
        unsigned mask[2];
 };
 
-extern unsigned char __restore[], __restore_rt[];
+extern hidden unsigned char __restore[], __restore_rt[];
index 7743c5c..c40e356 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        void (*handler)(int);
        unsigned long flags;
@@ -5,5 +7,5 @@ struct k_sigaction {
        unsigned mask[2];
 };
 
-void __restore_rt();
+hidden void __restore_rt();
 #define __restore __restore_rt
index 7743c5c..c40e356 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 struct k_sigaction {
        void (*handler)(int);
        unsigned long flags;
@@ -5,5 +7,5 @@ struct k_sigaction {
        unsigned mask[2];
 };
 
-void __restore_rt();
+hidden void __restore_rt();
 #define __restore __restore_rt
index 1d8d964..8ebd593 100644 (file)
@@ -1,3 +1,5 @@
+#include <features.h>
+
 /* This is the structure used for the rt_sigaction syscall on most archs,
  * but it can be overridden by a file with the same name in the top-level
  * arch dir for a given arch, if necessary. */
@@ -8,4 +10,4 @@ struct k_sigaction {
        unsigned mask[2];
 };
 
-void __restore(), __restore_rt();
+hidden void __restore(), __restore_rt();
index d3d0243..d4e5fcf 100644 (file)
@@ -1,7 +1,9 @@
 .global __restore
+.hidden __restore
 .type __restore,%function
 __restore:
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,%function
 __restore_rt:
        mov x8,#139 // SYS_rt_sigreturn
index 22fb1a5..fb086d9 100644 (file)
@@ -1,12 +1,14 @@
 .syntax unified
 
 .global __restore
+.hidden __restore
 .type __restore,%function
 __restore:
        mov r7,#119
        swi 0x0
 
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,%function
 __restore_rt:
        mov r7,#173
index a30b69c..ccc9430 100644 (file)
@@ -1,4 +1,5 @@
 .global __restore
+.hidden __restore
 .type __restore,@function
 __restore:
        popl %eax
@@ -6,6 +7,7 @@ __restore:
        int $0x80
 
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,@function
 __restore_rt:
        movl $173, %eax
index fe4f5a0..b3c9f57 100644 (file)
@@ -1,10 +1,12 @@
 .global __restore
+.hidden __restore
 .type __restore,@function
 __restore:
        ori     r12, r0, 119
        brki    r14, 0x8
 
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,@function
 __restore_rt:
        ori     r12, r0, 173
index 5c22dd4..b6dadce 100644 (file)
@@ -1,12 +1,14 @@
 .set noreorder
 
 .global __restore_rt
+.hidden __restore_rt
 .type   __restore_rt,@function
 __restore_rt:
        li $2, 4193
        syscall
 
 .global __restore
+.hidden __restore
 .type   __restore,@function
 __restore:
        li $2, 4119
index e898836..401f8e7 100644 (file)
@@ -1,6 +1,8 @@
 .set   noreorder
 .global        __restore_rt
 .global        __restore
+.hidden __restore_rt
+.hidden __restore
 .type  __restore_rt,@function
 .type  __restore,@function
 __restore_rt:
index 0d1c1c5..4cd4e1b 100644 (file)
@@ -1,6 +1,8 @@
 .set   noreorder
 .global        __restore_rt
 .global        __restore
+.hidden __restore_rt
+.hidden __restore
 .type  __restore_rt,@function
 .type  __restore,@function
 __restore_rt:
index 4d41c27..29c8afd 100644 (file)
@@ -1,10 +1,12 @@
        .global __restore
+       .hidden __restore
        .type __restore,%function
 __restore:
        li      0, 119 #__NR_sigreturn
        sc
 
        .global __restore_rt
+       .hidden __restore_rt
        .type __restore_rt,%function
 __restore_rt:
        li      0, 172 # __NR_rt_sigreturn
index 4d41c27..29c8afd 100644 (file)
@@ -1,10 +1,12 @@
        .global __restore
+       .hidden __restore
        .type __restore,%function
 __restore:
        li      0, 119 #__NR_sigreturn
        sc
 
        .global __restore_rt
+       .hidden __restore_rt
        .type __restore_rt,%function
 __restore_rt:
        li      0, 172 # __NR_rt_sigreturn
index 873b867..5ec4f5d 100644 (file)
@@ -1,10 +1,12 @@
+#include <features.h>
+
 /* These functions will not work, but suffice for targets where the
  * kernel sigaction structure does not actually use sa_restorer. */
 
-void __restore()
+hidden void __restore()
 {
 }
 
-void __restore_rt()
+hidden void __restore_rt()
 {
 }
index 79beb68..88e33db 100644 (file)
@@ -1,9 +1,11 @@
        .global __restore
+       .hidden __restore
        .type __restore,%function
 __restore:
        svc 119 #__NR_sigreturn
 
        .global __restore_rt
+       .hidden __restore_rt
        .type __restore_rt,%function
 __restore_rt:
        svc 173 # __NR_rt_sigreturn
index d5df8e1..3a92199 100644 (file)
@@ -1,4 +1,5 @@
 .global __restore
+.hidden __restore
 __restore:
        mov   #119, r3  !__NR_sigreturn
        trapa #31
@@ -10,6 +11,7 @@ __restore:
        or    r0, r0
 
 .global __restore_rt
+.hidden __restore_rt
 __restore_rt:
        mov   #100, r3  !__NR_rt_sigreturn
        add   #73, r3
index 2f06e78..1117446 100644 (file)
@@ -1,5 +1,6 @@
        nop
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,@function
 __restore_rt:
        mov $0x40000201, %rax /* SYS_rt_sigreturn */
index b5c6e37..27d6cf3 100644 (file)
@@ -1,5 +1,6 @@
        nop
 .global __restore_rt
+.hidden __restore_rt
 .type __restore_rt,@function
 __restore_rt:
        mov $15, %rax