shinh/maloader — Issue #3: maloader problems on Debian Testing
Author: grinder
Created: 2011-10-10 23:59:17+00:00
State: open

Firstly, maloader won't build properly with gcc/g++ 4.6 on this distribution. It's fairly contemporary with Linux 3.0.0, gcc 4.6, etc.

The 'macho2elf' and 'ldmac' binaries can be made to build by installing:

gcc-4.5
cpp-4.5
libstdc++6-4.5-dev

After installing and running:

CC=gcc-4.5 CXX=g++-4.5 make

XCode 4.0 gcc fails with:

collect2: ld terminated with signal 11 [Segmentation fault]
Segmentation fault(11) 1 (@0x100173b60) PC: 0x1000fbcb5

/opt/darwin/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld(lazy_load_dylib+1e0) [0x1000fbcb5(fbcb5)]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf020) [0x7fc6e10cf020]

The installed version of libpthread is 2.13

XCode 4.1 llvm-gcc fails with:

collect2: ld terminated with signal 6 [Aborted]
__cxa_throw: obj=0xb7bf70
library not found for -lcrt1.10.6.o
Aborted(6) -6 (@0x3e800002e25) PC: 0x7f7db146b405

/opt/xcode/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin11/4.2.1/ld(_Z6throwfPKcz+b2) [0x1000014d2(14d2)]
/home/alex/machloader/libmac.so(strlcpy+0) [0x7f7db1232897]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7f7db146e680]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f7db146b405]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf020) [0x7f7db1f6e020]

Any help would be appreciated!