Link-Time Optimization Breaks Executable
Link-Time Optimization Breaks Executable
- Subject: Link-Time Optimization Breaks Executable
- From: Andreas Grosam <email@hidden>
- Date: Thu, 10 Nov 2011 11:41:45 +0100
I'm getting linker warnings when compiling a (static) library with Link-Time optimization enabled:
1) ld: warning: section __DATA/__objc_imageinfo has unexpectedly large size 48 in /tmp/lto.o
2) warning: (x86_64) /tmp/lto.o unable to open object file
Then, a category for NSData fails at runtime from within an executable that links again the static lib with exception "unrecognized selector sent to instance x" when, x receives the message defined in the category. (In this case, NSData was actually NSConcreteData, anyway that doesn't matter, just for info)
With Link-Time Optimization disabled in the static library, the bug does not occur.
Building a dynamic lib will issue a similar linker warning, but also fails later with:
Assertion failed: (ref_die != NULL), function AppendDependants, file /SourceCache/dwarf_utilities/dwarf_utilities-87/source/DWARFDebugInfoEntry.cpp, line 407.
Command /Developer/usr/bin/dsymutil failed with exit code 6
Andreas _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden