Bläddra i källkod

use hidden visibility for call from dlsym to internal __dlsym

Rich Felker 10 år sedan
förälder
incheckning
72b25ddb77

+ 1 - 0
src/ldso/aarch64/dlsym.s

@@ -1,4 +1,5 @@
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,%function
 .type dlsym,%function
 dlsym:
 dlsym:
 	mov x2,x30
 	mov x2,x30

+ 1 - 0
src/ldso/arm/dlsym.s

@@ -1,5 +1,6 @@
 .text
 .text
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,%function
 .type dlsym,%function
 dlsym:
 dlsym:
 	mov r2,lr
 	mov r2,lr

+ 1 - 0
src/ldso/dynlink.c

@@ -1598,6 +1598,7 @@ int __dladdr(const void *addr, Dl_info *info)
 	return 1;
 	return 1;
 }
 }
 
 
+__attribute__((__visibility__("hidden")))
 void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
 void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
 {
 {
 	void *res;
 	void *res;

+ 1 - 0
src/ldso/i386/dlsym.s

@@ -1,5 +1,6 @@
 .text
 .text
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,@function
 .type dlsym,@function
 dlsym:
 dlsym:
 	push (%esp)
 	push (%esp)

+ 2 - 1
src/ldso/microblaze/dlsym.s

@@ -1,5 +1,6 @@
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type   dlsym,@function
 .type   dlsym,@function
 dlsym:
 dlsym:
-	brid    __dlsym@PLT
+	brid    __dlsym
 	add     r7, r15, r0
 	add     r7, r15, r0

+ 1 - 0
src/ldso/mips/dlsym.s

@@ -1,5 +1,6 @@
 .set noreorder
 .set noreorder
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,@function
 .type dlsym,@function
 dlsym:
 dlsym:
 	lui $gp, %hi(_gp_disp)
 	lui $gp, %hi(_gp_disp)

+ 2 - 1
src/ldso/or1k/dlsym.s

@@ -1,5 +1,6 @@
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type   dlsym,@function
 .type   dlsym,@function
 dlsym:
 dlsym:
-	l.j	plt(__dlsym)
+	l.j	__dlsym
 	 l.ori	r5, r9, 0
 	 l.ori	r5, r9, 0

+ 1 - 0
src/ldso/powerpc/dlsym.s

@@ -1,5 +1,6 @@
 	.text
 	.text
 	.global dlsym
 	.global dlsym
+	.hidden __dlsym
 	.type   dlsym,@function
 	.type   dlsym,@function
 dlsym:
 dlsym:
 	mflr    5                      # The return address is arg3.
 	mflr    5                      # The return address is arg3.

+ 2 - 1
src/ldso/sh/dlsym.s

@@ -1,5 +1,6 @@
 .text
 .text
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type   dlsym, @function
 .type   dlsym, @function
 dlsym:
 dlsym:
 	mov.l L1, r0
 	mov.l L1, r0
@@ -7,4 +8,4 @@ dlsym:
 1:	 mov.l @r15, r6
 1:	 mov.l @r15, r6
 
 
 .align 2
 .align 2
-L1:	.long __dlsym@PLT-(1b-.)
+L1:	.long __dlsym-(1b-.)

+ 1 - 0
src/ldso/x32/dlsym.s

@@ -1,5 +1,6 @@
 .text
 .text
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,@function
 .type dlsym,@function
 dlsym:
 dlsym:
 	mov (%rsp),%rdx
 	mov (%rsp),%rdx

+ 1 - 0
src/ldso/x86_64/dlsym.s

@@ -1,5 +1,6 @@
 .text
 .text
 .global dlsym
 .global dlsym
+.hidden __dlsym
 .type dlsym,@function
 .type dlsym,@function
 dlsym:
 dlsym:
 	mov (%rsp),%rdx
 	mov (%rsp),%rdx