ABI, and stop calling atexit(4) directly from ld.so on powerpc.
-/* $OpenBSD: loader.c,v 1.138 2013/12/23 21:18:57 kettenis Exp $ */
+/* $OpenBSD: loader.c,v 1.139 2013/12/23 22:03:52 kettenis Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
}
#if !defined(__alpha__) && !defined(__hppa__) && !defined(__i386__) && \
- !defined(__sparc64__)
+ !defined(__powerpc__) && !defined(__sparc64__)
/*
* Schedule a routine to be run at shutdown, by using atexit.
* Cannot call atexit directly from ld.so?
-/* $OpenBSD: ldasm.S,v 1.15 2013/12/23 21:49:27 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.16 2013/12/23 22:03:52 kettenis Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
mr 4, 21
mr 5, 22
mr 6, 23
- li 7, 0
+ bl _GLOBAL_OFFSET_TABLE_@local-4
+ mflr 31
+ lwz 7, _dl_dtors@got(31)
mtlr 27
lwz 1, 0(1) # Restore stack pointer.