瀏覽代碼

remove remaining traces of __tls_get_new

Some declarations of __tls_get_new were left in the code, even
though the definition got removed in

  commit 9d44b6460ab603487dab4d916342d9ba4467e6b9
  install dynamic tls synchronously at dlopen, streamline access

this can make the build fail with

  ld: lib/libc.so: hidden symbol `__tls_get_new' isn't defined

when libc.so is linked without --gc-sections, because a .hidden
declaration in asm code creates a reference even if the symbol
is not actually used.
Szabolcs Nagy 5 年之前
父節點
當前提交
33bc7f05fc
共有 5 個文件被更改,包括 1 次插入12 次删除
  1. 0 1
      src/internal/pthread_impl.h
  2. 1 5
      src/ldso/aarch64/tlsdesc.s
  3. 0 2
      src/ldso/arm/tlsdesc.S
  4. 0 2
      src/ldso/i386/tlsdesc.s
  5. 0 2
      src/ldso/x86_64/tlsdesc.s

+ 0 - 1
src/internal/pthread_impl.h

@@ -125,7 +125,6 @@ struct __timer {
 	 0x80000000 })
 
 void *__tls_get_addr(tls_mod_off_t *);
-hidden void *__tls_get_new(tls_mod_off_t *);
 hidden int __init_tp(void *);
 hidden void *__copy_tls(unsigned char *);
 hidden void __reset_tls();

+ 1 - 5
src/ldso/aarch64/tlsdesc.s

@@ -9,15 +9,11 @@ __tlsdesc_static:
 	ldr x0,[x0,#8]
 	ret
 
-.hidden __tls_get_new
-
 // size_t __tlsdesc_dynamic(size_t *a)
 // {
 // 	struct {size_t modidx,off;} *p = (void*)a[1];
 // 	size_t *dtv = *(size_t**)(tp - 8);
-// 	if (p->modidx <= dtv[0])
-// 		return dtv[p->modidx] + p->off - tp;
-// 	return __tls_get_new(p) - tp;
+// 	return dtv[p->modidx] + p->off - tp;
 // }
 .global __tlsdesc_dynamic
 .hidden __tlsdesc_dynamic

+ 0 - 2
src/ldso/arm/tlsdesc.S

@@ -8,8 +8,6 @@ __tlsdesc_static:
 	ldr r0,[r0]
 	bx lr
 
-.hidden __tls_get_new
-
 .global __tlsdesc_dynamic
 .hidden __tlsdesc_dynamic
 .type __tlsdesc_dynamic,%function

+ 0 - 2
src/ldso/i386/tlsdesc.s

@@ -6,8 +6,6 @@ __tlsdesc_static:
 	mov 4(%eax),%eax
 	ret
 
-.hidden __tls_get_new
-
 .global __tlsdesc_dynamic
 .hidden __tlsdesc_dynamic
 .type __tlsdesc_dynamic,@function

+ 0 - 2
src/ldso/x86_64/tlsdesc.s

@@ -6,8 +6,6 @@ __tlsdesc_static:
 	mov 8(%rax),%rax
 	ret
 
-.hidden __tls_get_new
-
 .global __tlsdesc_dynamic
 .hidden __tlsdesc_dynamic
 .type __tlsdesc_dynamic,@function