From f5f7673d71f843b423e60bbdd7de49fd1bbcc8c1 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 10 Sep 2018 15:36:33 -0400 Subject: [PATCH] make arch __clone backends hidden these are not a public interface and are not intended to be callable from anywhere but the public clone function or other places in libc. --- src/internal/pthread_impl.h | 2 +- src/thread/aarch64/clone.s | 1 + src/thread/arm/clone.s | 1 + src/thread/i386/clone.s | 1 + src/thread/m68k/clone.s | 1 + src/thread/microblaze/clone.s | 1 + src/thread/mips/clone.s | 1 + src/thread/mips64/clone.s | 1 + src/thread/mipsn32/clone.s | 1 + src/thread/or1k/clone.s | 1 + src/thread/powerpc/clone.s | 1 + src/thread/powerpc64/clone.s | 1 + src/thread/s390x/clone.s | 1 + src/thread/sh/clone.s | 1 + src/thread/x32/clone.s | 1 + src/thread/x86_64/clone.s | 1 + 16 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 3479bcf6..3c85544c 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -141,7 +141,7 @@ int __init_tp(void *); void *__copy_tls(unsigned char *); void __reset_tls(); -int __clone(int (*)(void *), void *, int, void *, ...); +hidden int __clone(int (*)(void *), void *, int, void *, ...); int __set_thread_area(void *); int __libc_sigaction(int, const struct sigaction *, struct sigaction *); void __unmapself(void *, size_t); diff --git a/src/thread/aarch64/clone.s b/src/thread/aarch64/clone.s index 50af913c..e3c83395 100644 --- a/src/thread/aarch64/clone.s +++ b/src/thread/aarch64/clone.s @@ -5,6 +5,7 @@ // x8, x0, x1, x2, x3, x4 .global __clone +.hidden __clone .type __clone,%function __clone: // align stack and save func,arg diff --git a/src/thread/arm/clone.s b/src/thread/arm/clone.s index fe2e0e60..e16b1326 100644 --- a/src/thread/arm/clone.s +++ b/src/thread/arm/clone.s @@ -1,6 +1,7 @@ .syntax unified .text .global __clone +.hidden __clone .type __clone,%function __clone: stmfd sp!,{r4,r5,r6,r7} diff --git a/src/thread/i386/clone.s b/src/thread/i386/clone.s index 52fe7efb..e237d3c6 100644 --- a/src/thread/i386/clone.s +++ b/src/thread/i386/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone,@function __clone: push %ebp diff --git a/src/thread/m68k/clone.s b/src/thread/m68k/clone.s index 5b61b6fa..f6dfa06f 100644 --- a/src/thread/m68k/clone.s +++ b/src/thread/m68k/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone,@function __clone: movem.l %d2-%d5,-(%sp) diff --git a/src/thread/microblaze/clone.s b/src/thread/microblaze/clone.s index 13448a33..b68cc5fc 100644 --- a/src/thread/microblaze/clone.s +++ b/src/thread/microblaze/clone.s @@ -1,4 +1,5 @@ .global __clone +.hidden __clone .type __clone,@function # r5, r6, r7, r8, r9, r10, stack diff --git a/src/thread/mips/clone.s b/src/thread/mips/clone.s index 30a0146b..04463385 100644 --- a/src/thread/mips/clone.s +++ b/src/thread/mips/clone.s @@ -1,5 +1,6 @@ .set noreorder .global __clone +.hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack diff --git a/src/thread/mips64/clone.s b/src/thread/mips64/clone.s index 1b71e07c..2d86899a 100644 --- a/src/thread/mips64/clone.s +++ b/src/thread/mips64/clone.s @@ -1,5 +1,6 @@ .set noreorder .global __clone +.hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack diff --git a/src/thread/mipsn32/clone.s b/src/thread/mipsn32/clone.s index ebf5dbea..4d3c8c7a 100644 --- a/src/thread/mipsn32/clone.s +++ b/src/thread/mipsn32/clone.s @@ -1,5 +1,6 @@ .set noreorder .global __clone +.hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack diff --git a/src/thread/or1k/clone.s b/src/thread/or1k/clone.s index 02f380bd..2473ac20 100644 --- a/src/thread/or1k/clone.s +++ b/src/thread/or1k/clone.s @@ -3,6 +3,7 @@ * sys_clone(flags, stack, ptid, ctid, tls) */ .global __clone +.hidden __clone .type __clone,@function __clone: l.addi r4, r4, -8 diff --git a/src/thread/powerpc/clone.s b/src/thread/powerpc/clone.s index a57dbcce..da13f446 100644 --- a/src/thread/powerpc/clone.s +++ b/src/thread/powerpc/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone, %function __clone: # int clone(fn, stack, flags, arg, ptid, tls, ctid) diff --git a/src/thread/powerpc64/clone.s b/src/thread/powerpc64/clone.s index 03aa4468..41cb6787 100644 --- a/src/thread/powerpc64/clone.s +++ b/src/thread/powerpc64/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone, %function __clone: # int clone(fn, stack, flags, arg, ptid, tls, ctid) diff --git a/src/thread/s390x/clone.s b/src/thread/s390x/clone.s index 3e08c213..577748ea 100644 --- a/src/thread/s390x/clone.s +++ b/src/thread/s390x/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone, %function __clone: # int clone( diff --git a/src/thread/sh/clone.s b/src/thread/sh/clone.s index aa4d0dfd..9cfd8623 100644 --- a/src/thread/sh/clone.s +++ b/src/thread/sh/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone, @function __clone: ! incoming: fn stack flags arg ptid tls ctid diff --git a/src/thread/x32/clone.s b/src/thread/x32/clone.s index eed46151..b870880f 100644 --- a/src/thread/x32/clone.s +++ b/src/thread/x32/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone,@function __clone: movl $0x40000038,%eax /* SYS_clone */ diff --git a/src/thread/x86_64/clone.s b/src/thread/x86_64/clone.s index ee59903a..6e47bc0a 100644 --- a/src/thread/x86_64/clone.s +++ b/src/thread/x86_64/clone.s @@ -1,5 +1,6 @@ .text .global __clone +.hidden __clone .type __clone,@function __clone: xor %eax,%eax -- GitLab