Browse Source

xtensa: make _init and _fini hidden

Make _init and _fini hidden so that references to these symbols bind
locally in the shared objects. glibc does the same.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Max Filippov 1 year ago
parent
commit
7be734848b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      libc/sysdeps/linux/xtensa/crti.S

+ 2 - 0
libc/sysdeps/linux/xtensa/crti.S

@@ -3,6 +3,7 @@
 	.section .init
 	.section .init
 	.align	4
 	.align	4
 	.global	_init
 	.global	_init
+	.hidden _init
 	.type	_init, @function
 	.type	_init, @function
 _init:
 _init:
 #if defined(__XTENSA_WINDOWED_ABI__)
 #if defined(__XTENSA_WINDOWED_ABI__)
@@ -17,6 +18,7 @@ _init:
 	.section .fini
 	.section .fini
 	.align	4
 	.align	4
 	.global	_fini
 	.global	_fini
+	.hidden _fini
 	.type	_fini, @function
 	.type	_fini, @function
 _fini:
 _fini:
 #if defined(__XTENSA_WINDOWED_ABI__)
 #if defined(__XTENSA_WINDOWED_ABI__)