diff options
author | 2013-12-25 15:01:39 +0000 | |
---|---|---|
committer | 2013-12-25 15:01:39 +0000 | |
commit | 9ede8e9c938aa673909d680550f88940461be8c5 (patch) | |
tree | 634ade7905b4a091e21f8e9c94a0fbe10a6515d5 | |
parent | In the SYNOPSIS, implement hanging indentation for .Fo (diff) | |
download | wireguard-openbsd-9ede8e9c938aa673909d680550f88940461be8c5.tar.xz wireguard-openbsd-9ede8e9c938aa673909d680550f88940461be8c5.zip |
Pass _dl_dtors as the csu cleanup routine on arm.
-rw-r--r-- | libexec/ld.so/arm/ldasm.S | 12 | ||||
-rw-r--r-- | libexec/ld.so/loader.c | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libexec/ld.so/arm/ldasm.S b/libexec/ld.so/arm/ldasm.S index 36eb0f17031..10a1f3a57e1 100644 --- a/libexec/ld.so/arm/ldasm.S +++ b/libexec/ld.so/arm/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.11 2013/08/13 05:52:18 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.12 2013/12/25 15:01:39 miod Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -56,8 +56,16 @@ ENTRY(_dl_start) mov lr, r6 mov r1, r0 - mov r0, #0 + ldr r2, .L_GOT +1: + add r2, pc, r2 + ldr r0, .L_dl_dtors + add r0, r0, r2 mov pc, r1 +.L_GOT: + .long _GLOBAL_OFFSET_TABLE_-(1b+8) +.L_dl_dtors: + .long _dl_dtors(GOTOFF) ENTRY(_dl_bind_start) diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index b137fbc6033..c978e269e31 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.142 2013/12/25 13:06:00 miod Exp $ */ +/* $OpenBSD: loader.c,v 1.143 2013/12/25 15:01:39 miod Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -604,7 +604,7 @@ _dl_boot(const char **argv, char **envp, const long dyn_loff, long *dl_data) _dl_call_init(_dl_objects); } -#if defined(__arm__) || defined(__mips64__) || defined(__sh__) /* XXX */ +#if defined(__mips64__) || defined(__sh__) /* XXX */ /* * Schedule a routine to be run at shutdown, by using atexit. * Cannot call atexit directly from ld.so? |