ppc64: chase API changes related to freestanding stuff

freestanding is however NOT supported here
pull/21/head
Ariadne Conill 2020-12-06 12:23:09 +00:00
parent 131e825f50
commit da736b6add
6 changed files with 17 additions and 12 deletions

View File

@ -42,7 +42,7 @@ ${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ}
$(AR) rcs ${LIBUCONTEXT_STATIC_NAME} ${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}
${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME}

View File

@ -62,4 +62,6 @@
/* lnk register is actually %r36 */
#define REG_LNK REG_R36
#include "common-defs.h"
#endif

View File

@ -11,7 +11,7 @@
*/
.global libucontext_getcontext
.hidden libucontext_swapcontext
.hidden __libucontext_swapcontext
libucontext_getcontext:
addis 2, 12, .TOC.-libucontext_getcontext@ha
addi 2, 12, .TOC.-libucontext_getcontext@l
@ -19,7 +19,7 @@ libucontext_getcontext:
.localentry libucontext_getcontext,.-libucontext_getcontext
li 4, 0
b libucontext_swapcontext
b __libucontext_swapcontext
.weak getcontext
getcontext = libucontext_getcontext

View File

@ -23,7 +23,7 @@ extern void libucontext_trampoline(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;
va_list va;

View File

@ -11,7 +11,7 @@
*/
.global libucontext_setcontext
.hidden libucontext_swapcontext
.hidden __libucontext_swapcontext
libucontext_setcontext:
addis 2, 12, .TOC.-libucontext_setcontext@ha
addi 2, 12, .TOC.-libucontext_setcontext@l
@ -20,7 +20,7 @@ libucontext_setcontext:
mr 4, 3
li 3, 0
b libucontext_swapcontext
b __libucontext_swapcontext
.weak setcontext
setcontext = libucontext_setcontext

View File

@ -10,12 +10,12 @@
* from the use of this software.
*/
.global libucontext_swapcontext
libucontext_swapcontext:
addis 2, 12, .TOC.-libucontext_swapcontext@ha
addi 2, 12, .TOC.-libucontext_swapcontext@l
.global __libucontext_swapcontext
__libucontext_swapcontext:
addis 2, 12, .TOC.-__libucontext_swapcontext@ha
addi 2, 12, .TOC.-__libucontext_swapcontext@l
.localentry libucontext_swapcontext,.-libucontext_swapcontext
.localentry __libucontext_swapcontext,.-__libucontext_swapcontext
li 0, 249 # SYS_swapcontext
li 5, 1696 # sizeof(ucontext_t)
@ -25,4 +25,7 @@ libucontext_swapcontext:
b __retfromsyscall
.weak swapcontext
swapcontext = libucontext_swapcontext
swapcontext = __libucontext_swapcontext
.weak libucontext_swapcontext
libucontext_swapcontext = __libucontext_swapcontext