[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Difficulties building Coco and liblua.so
- From: Mike Pall <mikelu-0909@...>
- Date: Tue, 8 Sep 2009 02:09:08 +0200
Jim Pryor wrote:
> [...] and adds -fPIC to the CFLAGS. This is needed to be able to build
> liblua.so on x86_64.
Looks like GCC treats references to assembler functions and static
C functions differently in PIC mode. Here's the fix:
Edit lcoco.c and replace the definition of coco_wrap_main plus the
assembler stuff immediately below it with this code:
static void coco_wrap_main(void)
{
__asm__ __volatile__ ("\tmovq %r13, %rdi\n\tjmpq *%r12\n");
}
I'll release an update to Coco ASAP.
--Mike