diff --git a/arch/mips/ksigaction.h b/arch/mips/ksigaction.h index 3127f7c0218333196945bca4139c3ef0c3df4483..63fdfab00b01fc6d780107bacfbfbd386a9b6c81 100644 --- a/arch/mips/ksigaction.h +++ b/arch/mips/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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(); diff --git a/arch/mips64/ksigaction.h b/arch/mips64/ksigaction.h index 55ba18ea945c5b41bb4eab0f8ff07e960b88623b..c16e4731d84a61fca4cdeba3f5df215731334fd3 100644 --- a/arch/mips64/ksigaction.h +++ b/arch/mips64/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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(); diff --git a/arch/mipsn32/ksigaction.h b/arch/mipsn32/ksigaction.h index 9969e3b2fc452e6c8e5470654f4e2faedc72581f..b565f1fc93e70727a788bdbace109eb496429865 100644 --- a/arch/mipsn32/ksigaction.h +++ b/arch/mipsn32/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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(); diff --git a/arch/sh/ksigaction.h b/arch/sh/ksigaction.h index 0c652bea0a6d10b5db4f3e6743c3ac071847061f..714ae619b4b248956002b193bf6f333ed8346c9a 100644 --- a/arch/sh/ksigaction.h +++ b/arch/sh/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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[]; diff --git a/arch/x32/ksigaction.h b/arch/x32/ksigaction.h index 7743c5c6b8122bc3dd5692bead45c00623d57dbf..c40e356842561c8269cda7c84ac7e2cffb1c90e7 100644 --- a/arch/x32/ksigaction.h +++ b/arch/x32/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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 diff --git a/arch/x86_64/ksigaction.h b/arch/x86_64/ksigaction.h index 7743c5c6b8122bc3dd5692bead45c00623d57dbf..c40e356842561c8269cda7c84ac7e2cffb1c90e7 100644 --- a/arch/x86_64/ksigaction.h +++ b/arch/x86_64/ksigaction.h @@ -1,3 +1,5 @@ +#include + 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 diff --git a/src/internal/ksigaction.h b/src/internal/ksigaction.h index 1d8d9646149b6900e41bf42dcc111e86143369bf..8ebd5938352e7e0179dc745a897bb6894935ac6d 100644 --- a/src/internal/ksigaction.h +++ b/src/internal/ksigaction.h @@ -1,3 +1,5 @@ +#include + /* 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(); diff --git a/src/signal/aarch64/restore.s b/src/signal/aarch64/restore.s index d3d0243d416ee2e4394f48ae86e93cbfaabef8c4..d4e5fcf1a32770ee4d14f30b6c314da487a478dd 100644 --- a/src/signal/aarch64/restore.s +++ b/src/signal/aarch64/restore.s @@ -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 diff --git a/src/signal/arm/restore.s b/src/signal/arm/restore.s index 22fb1a54f58eb05a49d9632963a9f124f953d89f..fb086d9ba7c573878e55730e715700abfac893da 100644 --- a/src/signal/arm/restore.s +++ b/src/signal/arm/restore.s @@ -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 diff --git a/src/signal/i386/restore.s b/src/signal/i386/restore.s index a30b69c41453b1231819cf2eec81c02af1fe5a0e..ccc94307aea924e700fc910510b04af6dc1a5f1a 100644 --- a/src/signal/i386/restore.s +++ b/src/signal/i386/restore.s @@ -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 diff --git a/src/signal/microblaze/restore.s b/src/signal/microblaze/restore.s index fe4f5a0976309485d9c94857ef6fce94819805b1..b3c9f57b65360212bb470db93cd9f4d4fef362e5 100644 --- a/src/signal/microblaze/restore.s +++ b/src/signal/microblaze/restore.s @@ -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 diff --git a/src/signal/mips/restore.s b/src/signal/mips/restore.s index 5c22dd4877b949a5dd879acf2bc90a366a531188..b6dadce07177f4cdb878cb13db6f8bae4915222b 100644 --- a/src/signal/mips/restore.s +++ b/src/signal/mips/restore.s @@ -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 diff --git a/src/signal/mips64/restore.s b/src/signal/mips64/restore.s index e8988369e46b91fffa3de02c0693a40b06a33b00..401f8e73222e98d599194e7d24fec1ac84dd7a2a 100644 --- a/src/signal/mips64/restore.s +++ b/src/signal/mips64/restore.s @@ -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: diff --git a/src/signal/mipsn32/restore.s b/src/signal/mipsn32/restore.s index 0d1c1c5ef92d1b2a79dbfb3133a2260f9c61e554..4cd4e1b4e4c5dfbc30427465e2758dbec03efada 100644 --- a/src/signal/mipsn32/restore.s +++ b/src/signal/mipsn32/restore.s @@ -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: diff --git a/src/signal/powerpc/restore.s b/src/signal/powerpc/restore.s index 4d41c27aa8949591d0a5bf1b966b1d7ec6ac9baa..29c8afd03c6cd3ebda8eac01972231b551f96515 100644 --- a/src/signal/powerpc/restore.s +++ b/src/signal/powerpc/restore.s @@ -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 diff --git a/src/signal/powerpc64/restore.s b/src/signal/powerpc64/restore.s index 4d41c27aa8949591d0a5bf1b966b1d7ec6ac9baa..29c8afd03c6cd3ebda8eac01972231b551f96515 100644 --- a/src/signal/powerpc64/restore.s +++ b/src/signal/powerpc64/restore.s @@ -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 diff --git a/src/signal/restore.c b/src/signal/restore.c index 873b867e6feb701d140bdd31444135aed980f6af..5ec4f5dddc6587ddda37f5dba3687168eafeab72 100644 --- a/src/signal/restore.c +++ b/src/signal/restore.c @@ -1,10 +1,12 @@ +#include + /* 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() { } diff --git a/src/signal/s390x/restore.s b/src/signal/s390x/restore.s index 79beb68f7df996c4a9caac16ae316c43c75e334c..88e33dbc22230e38a68953ea28ef60df4091b58d 100644 --- a/src/signal/s390x/restore.s +++ b/src/signal/s390x/restore.s @@ -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 diff --git a/src/signal/sh/restore.s b/src/signal/sh/restore.s index d5df8e148811d76a3dc345461b3e0901ea3659b4..3a92199db632a39e28a03920f5284aa66a01bc62 100644 --- a/src/signal/sh/restore.s +++ b/src/signal/sh/restore.s @@ -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 diff --git a/src/signal/x32/restore.s b/src/signal/x32/restore.s index 2f06e787680a993fc62da5849311771ab84b812c..1117446a6cb34fbfd6811e7ee49e1b09cb31aae7 100644 --- a/src/signal/x32/restore.s +++ b/src/signal/x32/restore.s @@ -1,5 +1,6 @@ nop .global __restore_rt +.hidden __restore_rt .type __restore_rt,@function __restore_rt: mov $0x40000201, %rax /* SYS_rt_sigreturn */ diff --git a/src/signal/x86_64/restore.s b/src/signal/x86_64/restore.s index b5c6e37f77bb986e20757ea1c6847cbb99a4bc46..27d6cf310337a9e7227a0da422d3b37c9397091d 100644 --- a/src/signal/x86_64/restore.s +++ b/src/signal/x86_64/restore.s @@ -1,5 +1,6 @@ nop .global __restore_rt +.hidden __restore_rt .type __restore_rt,@function __restore_rt: mov $15, %rax