|
From: Jean-Pierre <cho...@fr...> - 2009-10-29 00:37:54
|
Hi,
Here's my latest dyngen patch for Snow Leopard x86_64 compatibility.
The previous version missed the local relocations for 16 bytes long
constants, this is now fixed.
It has been tested and produces a correct source code extracted from
the mach-o 64 bit object files built for SheepShaver, even though this
code is a lot different from its Linux x86_64 counterpart..
I added a patch to the Darwin/lowmem utility to let it deal with 32-
bit, 64-bit or fat architectures.
I also had to modify basic-dyngen-ops.cpp since apple's gcc adds a
leading underscore to its symbols, i.e.:
#if defined __x86_64__
#define MOV_AD_REG(PARAM, REG) asm volatile ("movabsq $__op_" #PARAM ",
%0" : "=r" (REG))
#else
...
becomes:
#if defined __x86_64__
#if defined(__MACH__)
#define MOV_AD_REG(PARAM, REG) asm volatile ("movabsq $___op_" #PARAM
",%0" : "=r" (REG))
#else
#define MOV_AD_REG(PARAM, REG) asm volatile ("movabsq $__op_" #PARAM ",
%0" : "=r" (REG))
#endif
#else
...
Here's how I built this version on MacOSX 10.6:
NO_CONFIGURE=1 ./autogen.sh
FLAGS="-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-
version-min=10.5"
CFLAGS="$FLAGS" CPPFLAGS="$FLAGS" LDFLAGS="$FLAGS" \
./configure --without-gtk --with-dgcc=g++-4.0
make
No more crash in Snow Leopard in 64-bit ! (:
Best regards,
- Jean-Pierre.
|