ppc64: chase API changes related to freestanding stuff
freestanding is however NOT supported herepull/21/head
parent
131e825f50
commit
da736b6add
2
Makefile
2
Makefile
|
@ -42,7 +42,7 @@ ${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ}
|
||||||
$(AR) rcs ${LIBUCONTEXT_STATIC_NAME} ${LIBUCONTEXT_OBJ}
|
$(AR) rcs ${LIBUCONTEXT_STATIC_NAME} ${LIBUCONTEXT_OBJ}
|
||||||
|
|
||||||
${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_HEADERS} ${LIBUCONTEXT_OBJ}
|
${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_HEADERS} ${LIBUCONTEXT_OBJ}
|
||||||
$(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \
|
$(CC) -fPIC -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \
|
||||||
-shared ${LIBUCONTEXT_OBJ} ${LDFLAGS}
|
-shared ${LIBUCONTEXT_OBJ} ${LDFLAGS}
|
||||||
|
|
||||||
${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME}
|
${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME}
|
||||||
|
|
|
@ -62,4 +62,6 @@
|
||||||
/* lnk register is actually %r36 */
|
/* lnk register is actually %r36 */
|
||||||
#define REG_LNK REG_R36
|
#define REG_LNK REG_R36
|
||||||
|
|
||||||
|
#include "common-defs.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global libucontext_getcontext
|
.global libucontext_getcontext
|
||||||
.hidden libucontext_swapcontext
|
.hidden __libucontext_swapcontext
|
||||||
libucontext_getcontext:
|
libucontext_getcontext:
|
||||||
addis 2, 12, .TOC.-libucontext_getcontext@ha
|
addis 2, 12, .TOC.-libucontext_getcontext@ha
|
||||||
addi 2, 12, .TOC.-libucontext_getcontext@l
|
addi 2, 12, .TOC.-libucontext_getcontext@l
|
||||||
|
@ -19,7 +19,7 @@ libucontext_getcontext:
|
||||||
.localentry libucontext_getcontext,.-libucontext_getcontext
|
.localentry libucontext_getcontext,.-libucontext_getcontext
|
||||||
|
|
||||||
li 4, 0
|
li 4, 0
|
||||||
b libucontext_swapcontext
|
b __libucontext_swapcontext
|
||||||
|
|
||||||
.weak getcontext
|
.weak getcontext
|
||||||
getcontext = libucontext_getcontext
|
getcontext = libucontext_getcontext
|
||||||
|
|
|
@ -23,7 +23,7 @@ extern void libucontext_trampoline(void);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
libucontext_makecontext(ucontext_t *ucp, void (*func)(), int argc, ...)
|
libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(), int argc, ...)
|
||||||
{
|
{
|
||||||
libucontext_greg_t *sp;
|
libucontext_greg_t *sp;
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global libucontext_setcontext
|
.global libucontext_setcontext
|
||||||
.hidden libucontext_swapcontext
|
.hidden __libucontext_swapcontext
|
||||||
libucontext_setcontext:
|
libucontext_setcontext:
|
||||||
addis 2, 12, .TOC.-libucontext_setcontext@ha
|
addis 2, 12, .TOC.-libucontext_setcontext@ha
|
||||||
addi 2, 12, .TOC.-libucontext_setcontext@l
|
addi 2, 12, .TOC.-libucontext_setcontext@l
|
||||||
|
@ -20,7 +20,7 @@ libucontext_setcontext:
|
||||||
|
|
||||||
mr 4, 3
|
mr 4, 3
|
||||||
li 3, 0
|
li 3, 0
|
||||||
b libucontext_swapcontext
|
b __libucontext_swapcontext
|
||||||
|
|
||||||
.weak setcontext
|
.weak setcontext
|
||||||
setcontext = libucontext_setcontext
|
setcontext = libucontext_setcontext
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
* from the use of this software.
|
* from the use of this software.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global libucontext_swapcontext
|
.global __libucontext_swapcontext
|
||||||
libucontext_swapcontext:
|
__libucontext_swapcontext:
|
||||||
addis 2, 12, .TOC.-libucontext_swapcontext@ha
|
addis 2, 12, .TOC.-__libucontext_swapcontext@ha
|
||||||
addi 2, 12, .TOC.-libucontext_swapcontext@l
|
addi 2, 12, .TOC.-__libucontext_swapcontext@l
|
||||||
|
|
||||||
.localentry libucontext_swapcontext,.-libucontext_swapcontext
|
.localentry __libucontext_swapcontext,.-__libucontext_swapcontext
|
||||||
|
|
||||||
li 0, 249 # SYS_swapcontext
|
li 0, 249 # SYS_swapcontext
|
||||||
li 5, 1696 # sizeof(ucontext_t)
|
li 5, 1696 # sizeof(ucontext_t)
|
||||||
|
@ -25,4 +25,7 @@ libucontext_swapcontext:
|
||||||
b __retfromsyscall
|
b __retfromsyscall
|
||||||
|
|
||||||
.weak swapcontext
|
.weak swapcontext
|
||||||
swapcontext = libucontext_swapcontext
|
swapcontext = __libucontext_swapcontext
|
||||||
|
|
||||||
|
.weak libucontext_swapcontext
|
||||||
|
libucontext_swapcontext = __libucontext_swapcontext
|
||||||
|
|
Loading…
Reference in New Issue