summaryrefslogtreecommitdiff
path: root/libexec/ld.so/arm
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-08-09 03:58:36 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-08-09 03:58:36 +0000
commitcbc8b61943a42512db04aa7c3a28d50ad635ba2d (patch)
tree88325780e5fbabf8824ea7ee525d3ca2e4b51075 /libexec/ld.so/arm
parent76093549a56e2aed50d99915a84892f888cd1f34 (diff)
Teach arm to pass &_DYNAMIC to _dl_boot_bind(); can optimize later in tree
Diffstat (limited to 'libexec/ld.so/arm')
-rw-r--r--libexec/ld.so/arm/ldasm.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/libexec/ld.so/arm/ldasm.S b/libexec/ld.so/arm/ldasm.S
index 80365b9b9c8..04e445b6ac1 100644
--- a/libexec/ld.so/arm/ldasm.S
+++ b/libexec/ld.so/arm/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.22 2016/05/07 19:05:23 guenther Exp $ */
+/* $OpenBSD: ldasm.S,v 1.23 2016/08/09 03:58:35 guenther Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -41,6 +41,12 @@ ENTRY(_dl_start)
mov r0, fp @ original stack
mov r1, r7 @ dl_data
+ ldr r8, .L_GOT @ calculate address of GOT...
+1: add r8, pc, r8 @ into r8
+
+ ldr r2, .L__DYNAMIC @ &_DYNAMIC
+ add r2, r2, r8
+
bl _dl_boot_bind
add r0, r5, #4 @ argv
@@ -56,14 +62,13 @@ ENTRY(_dl_start)
mov lr, r6
mov r1, r0
- ldr r2, .L_GOT
-1:
- add r2, pc, r2
ldr r0, .L_dl_dtors
- add r0, r0, r2
+ add r0, r0, r8
mov pc, r1
.L_GOT:
.long _GLOBAL_OFFSET_TABLE_-(1b+8)
+.L__DYNAMIC:
+ .long _DYNAMIC(GOTOFF)
.L_dl_dtors:
.long _dl_dtors(GOTOFF)