lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Mar 26, 2012 at 2:24 PM, Mike Pall <mikelu-1203@mike.de> wrote:
> Coda Highland wrote:
>> Well, for future reference, it seems that dead code stripping in
>> 64-bit causes problems.
>>
>> I reverted the build settings to defaults and started incrementally
>> making changes until it broke, and dead code stripping seems to be the
>> culprit.
>>
>> Should this be considered a build flag to avoid? Or does this indicate
>> a problem in LuaJIT failing to make the compiler think that some code
>> is alive?
>
> I'm not sure how dead code stripping on OSX works. Maybe this gets
> into trouble with the assembler part, which doesn't conform to the
> rules for standard C functions. E.g. there's cross-jumping between
> the internal pseudo-functions.
>
> I'm only pushing releases that have no dead code in the core VM.
> So simply avoid that build flag.

Well, I have bad news and I have good news.

The bad news is that some library (and I haven't the foggiest which,
it looks like some Apple framework but I can't tell) is causing the
linker to spit out a bunch of randomly-named undefined symbol errors
if I turn dead code stripping off. I tried for several hours to figure
out how to debug that but I'm completely baffled and I can't find any
good search terms to google for solutions.

The good news is that I found this:

http://iphone.galloway.me.uk/2011/03/assembly-beware-local-label-names-with-dead_strip-option/

This looks HIGHLY relevant. I'm going to go poke at the LuaJIT source
code to see if there's anything I can do. Mike, would you like a patch
if I get this working? Or would you like to do it yourself? I'm up for
any sort of collaboration if you want to, or I can (try to) do it
myself.

/s/ Adam