conditional in the MI code to only list the architectures left to adapt.
-/* $OpenBSD: loader.c,v 1.141 2013/12/25 11:10:02 kettenis Exp $ */
+/* $OpenBSD: loader.c,v 1.142 2013/12/25 13:06:00 miod Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
_dl_call_init(_dl_objects);
}
-#if !defined(__alpha__) && !defined(__amd64__) && !defined(__hppa__) && \
- !defined(__i386__) && !defined(__powerpc__) && !defined(__sparc__) && \
- !defined(__sparc64__)
+#if defined(__arm__) || defined(__mips64__) || defined(__sh__) /* XXX */
/*
* Schedule a routine to be run at shutdown, by using atexit.
* Cannot call atexit directly from ld.so?
-/* $OpenBSD: ldasm.S,v 1.5 2013/08/13 05:52:19 guenther Exp $ */
+/* $OpenBSD: ldasm.S,v 1.6 2013/12/25 13:06:02 miod Exp $ */
/*
* Copyright (c) 2006 Dale Rahn
addl #DL_DATA_SIZE, %sp | restore sp
moveal %d0, %a0
- clrl %d1
- moveal %d1, %a1 | cleanup as expected by CSU
+ lea %pc@(_dl_dtors),%a1 | cleanup
jmp (%a0)
rts
-/* $OpenBSD: ldasm.S,v 1.7 2013/08/13 05:52:20 guenther Exp $ */
+/* $OpenBSD: ldasm.S,v 1.8 2013/12/25 13:06:02 miod Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
addu %r2, %r30, 4 | argv
addu %r31, %r31, DL_DATA_SIZE
+ bsr 1f | the following instruction is skipped
+ bcnd eq0, %r0, _dl_dtors | but gives us the pc-relative offset
+1: ld.hu %r5, %r1, 2 | fetch branch offset (low 16 bits)
jmp.n %r2
- or %r5, %r0, %r0 | cleanup as expected by CSU
+ lda %r5, %r1[%r5] | cleanup
END(_dl_start)
/*