From 7405cd1e2bafc046b4311005b94092d74a7a9c66 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 14 Apr 2015 13:48:20 -0400 Subject: [PATCH] fix inconsistent visibility for internal syscall symbols --- src/internal/aarch64/syscall.s | 1 + src/internal/arm/syscall.s | 1 + src/internal/i386/syscall.s | 1 + src/internal/microblaze/syscall.s | 1 + src/internal/mips/syscall.s | 1 + src/internal/or1k/syscall.s | 1 + src/internal/powerpc/syscall.s | 1 + src/internal/sh/syscall.s | 1 + src/internal/syscall.h | 2 +- src/internal/x32/syscall.s | 1 + src/internal/x86_64/syscall.s | 1 + src/thread/__syscall_cp.c | 5 +++++ 12 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/internal/aarch64/syscall.s b/src/internal/aarch64/syscall.s index 48fac924..845986bf 100644 --- a/src/internal/aarch64/syscall.s +++ b/src/internal/aarch64/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,%function __syscall: uxtw x8,w0 diff --git a/src/internal/arm/syscall.s b/src/internal/arm/syscall.s index c5ae25c3..2028456c 100644 --- a/src/internal/arm/syscall.s +++ b/src/internal/arm/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,%function __syscall: mov ip,sp diff --git a/src/internal/i386/syscall.s b/src/internal/i386/syscall.s index 739201ae..0ebf2218 100644 --- a/src/internal/i386/syscall.s +++ b/src/internal/i386/syscall.s @@ -59,6 +59,7 @@ __vsyscall6: ret .global __syscall +.hidden __syscall .type __syscall,@function __syscall: lea 24(%esp),%eax diff --git a/src/internal/microblaze/syscall.s b/src/internal/microblaze/syscall.s index 9bf7c0e0..e0312e78 100644 --- a/src/internal/microblaze/syscall.s +++ b/src/internal/microblaze/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,@function __syscall: addi r12, r5, 0 # Save the system call number diff --git a/src/internal/mips/syscall.s b/src/internal/mips/syscall.s index e18a382e..5d0def52 100644 --- a/src/internal/mips/syscall.s +++ b/src/internal/mips/syscall.s @@ -1,6 +1,7 @@ .set noreorder .global __syscall +.hidden __syscall .type __syscall,@function __syscall: move $2, $4 diff --git a/src/internal/or1k/syscall.s b/src/internal/or1k/syscall.s index 2ea0eb13..177964e9 100644 --- a/src/internal/or1k/syscall.s +++ b/src/internal/or1k/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,@function __syscall: l.ori r11, r3, 0 diff --git a/src/internal/powerpc/syscall.s b/src/internal/powerpc/syscall.s index bca620db..5b16b8f2 100644 --- a/src/internal/powerpc/syscall.s +++ b/src/internal/powerpc/syscall.s @@ -1,4 +1,5 @@ .global __syscall + .hidden __syscall .type __syscall,@function __syscall: mr 0, 3 # Save the system call number diff --git a/src/internal/sh/syscall.s b/src/internal/sh/syscall.s index a8fda1c0..d00712a9 100644 --- a/src/internal/sh/syscall.s +++ b/src/internal/sh/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall, @function __syscall: ! The kernel syscall entry point documents that the trap number indicates diff --git a/src/internal/syscall.h b/src/internal/syscall.h index e3a8c5d6..a93f6d1e 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -17,7 +17,7 @@ typedef long syscall_arg_t; #endif -#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303) +#ifdef SHARED __attribute__((visibility("hidden"))) #endif long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), diff --git a/src/internal/x32/syscall.s b/src/internal/x32/syscall.s index 6e0db09c..c4bee804 100644 --- a/src/internal/x32/syscall.s +++ b/src/internal/x32/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,@function __syscall: movq %rdi,%rax diff --git a/src/internal/x86_64/syscall.s b/src/internal/x86_64/syscall.s index 6e0db09c..c4bee804 100644 --- a/src/internal/x86_64/syscall.s +++ b/src/internal/x86_64/syscall.s @@ -1,4 +1,5 @@ .global __syscall +.hidden __syscall .type __syscall,@function __syscall: movq %rdi,%rax diff --git a/src/thread/__syscall_cp.c b/src/thread/__syscall_cp.c index a48cee9b..faf57b1a 100644 --- a/src/thread/__syscall_cp.c +++ b/src/thread/__syscall_cp.c @@ -1,6 +1,11 @@ #include "pthread_impl.h" #include "syscall.h" +#ifdef SHARED +__attribute__((__visibility__("hidden"))) +#endif +long __syscall_cp_c(); + static long sccp(syscall_arg_t nr, syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) -- 2.25.1