-/* $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
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)
-/* $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
_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?