diff mbox series

[1/3] arm: Use internal symbol for _dl_argv on _dl_start_user

Message ID 20211101125003.500945-2-adhemerval.zanella@linaro.org
State New
Headers show
Series Fix lld build for armhf | expand

Commit Message

Adhemerval Zanella Nov. 1, 2021, 12:50 p.m. UTC
The lld does not support R_ARM_GOTOFF32 to preemptible symbol (_dl_argv
has global visibility).  Use the internal alias instead (one option
would to use HIDDEN_JUMPTARGET, bu the macro is not defined for
!__ASSEMBLER__ and I made this patch arm-specific to avoid require to
check extensivelly on other architecture it this might break something).

Checked on arm-linux-gnueabihf.
---
 sysdeps/arm/dl-machine.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fangrui Song Nov. 1, 2021, 4:38 p.m. UTC | #1
On 2021-11-01, Adhemerval Zanella wrote:
>The lld does not support R_ARM_GOTOFF32 to preemptible symbol (_dl_argv
>has global visibility).  Use the internal alias instead (one option

s/global visibility/default visibility/

>would to use HIDDEN_JUMPTARGET, bu the macro is not defined for
>!__ASSEMBLER__ and I made this patch arm-specific to avoid require to
>check extensivelly on other architecture it this might break something).
>
>Checked on arm-linux-gnueabihf.
>---
> sysdeps/arm/dl-machine.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
>index c758bba169..4ecdde4355 100644
>--- a/sysdeps/arm/dl-machine.h
>+++ b/sysdeps/arm/dl-machine.h
>@@ -202,7 +202,7 @@ _dl_start_user:\n\
> .L_FINI_PROC:\n\
> 	.word	_dl_fini(GOTOFF)\n\
> .L_ARGV:\n\
>-	.word	_dl_argv(GOTOFF)\n\
>+	.word	__GI__dl_argv(GOTOFF)\n\
> .L_LOADED:\n\
> 	.word	_rtld_local(GOTOFF)\n\
> .previous\n\
>-- 
>2.32.0
>

Reviewed-by: Fangrui Song <maskray@google.com>
diff mbox series

Patch

diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index c758bba169..4ecdde4355 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -202,7 +202,7 @@  _dl_start_user:\n\
 .L_FINI_PROC:\n\
 	.word	_dl_fini(GOTOFF)\n\
 .L_ARGV:\n\
-	.word	_dl_argv(GOTOFF)\n\
+	.word	__GI__dl_argv(GOTOFF)\n\
 .L_LOADED:\n\
 	.word	_rtld_local(GOTOFF)\n\
 .previous\n\