2012-08-07 17:01:25 +02:00
|
|
|
ORIGFUNC= ${.PREFIX:S/^compat//}
|
|
|
|
RENAMEDFUNC=${.PREFIX:S/^compat__//:C/([0-9]{2})$//}
|
|
|
|
.if (${MACHINE_ARCH} == "i386")
|
|
|
|
FUNCTYPE= @function
|
|
|
|
PICJMP= jmpl *PIC_PLT(${ORIGFUNC})
|
|
|
|
JMP= jmp ${ORIGFUNC}
|
|
|
|
.elif (${MACHINE_ARCH} == "arm")
|
|
|
|
FUNCTYPE= %%function
|
|
|
|
PICJMP= bl PIC_SYM(${ORIGFUNC}, PLT)
|
|
|
|
JMP= b ${ORIGFUNC}
|
|
|
|
.endif
|
|
|
|
|
2012-03-31 02:28:03 +02:00
|
|
|
${ASM}:
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
printf '/* MINIX3 */ \n\
|
|
|
|
/* \n\
|
|
|
|
* Compatibility jump table for renamed symbols. \n\
|
|
|
|
* \n\
|
|
|
|
* DO NOT EDIT: this file is automatically generated. \n\
|
|
|
|
*/ \n\
|
|
|
|
#include <machine/asm.h> \n\
|
2012-08-07 17:01:25 +02:00
|
|
|
.global ${RENAMEDFUNC}; \n\
|
|
|
|
.global ${ORIGFUNC}; \n\
|
|
|
|
.type ${RENAMEDFUNC},${FUNCTYPE} \n\
|
|
|
|
${RENAMEDFUNC}: \n\
|
2012-03-31 02:28:03 +02:00
|
|
|
#ifdef PIC \n\
|
2012-08-07 17:01:25 +02:00
|
|
|
${PICJMP} \n\
|
2012-03-31 02:28:03 +02:00
|
|
|
#else \n\
|
2012-08-07 17:01:25 +02:00
|
|
|
${JMP} \n\
|
2012-03-31 02:28:03 +02:00
|
|
|
#endif \n\
|
|
|
|
\n ' >${.TARGET}
|
|
|
|
|