[Gc] Boehm GC and Iphone

Damian damian.pop at gmail.com
Fri Feb 11 18:09:17 PST 2011


> Hi Ivan. Yes, I compiled the test file (main.m in fact) in xcode with the
> working libgc.a (builded in the device itself). And it crashed.
> Then I took the main.o file xcode generated, and linked it in the device,
> and to my surprise, it worked.
> So the problem was on the linking, and I've just discovered something:
>
> I've found out that xcode projects can be compiled on the command line with
> a command like this:
> xcodebuild -project gc-test.xcodeproj -alltargets
> So I compiled it and seen all the commands the build process executes, and
> saw the linker call with a -dead_strip param.
> I've linked in the iphone again with that parameter, and it crashed.
> You can test it yourself, when linking add -dead_strip.
>
> So I disabled the dead strip in xcode for my project and it works. The
> problem is that the executable size goes from 979 kb to 1311kb.
>
> Why the sripping of dead code breakes everything?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20110211/116616bf/attachment.htm


More information about the Gc mailing list