Ld: warning: __DATA / __ objc_imageinfo__DATA section unexpectedly large

Does anyone know what this warning means? This is followed by an error:

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

This is an Xcode project for the iPad. I see this only when compiling for a simulator, not a device. I linked the static library (* .a) with this project, and it is there that I think this does not work. In addition, it was used to run on the simulator without any problems, and I'm not sure what has changed.

All compiler output:

 Ld /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator/IQ.app/IQ normal i386 cd /Users/cduckering/Desktop/LitePoint/Apps/App/IQ setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator -F/Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator -filelist /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.LinkFileList -mmacosx-version-min=10.6 -dead_strip -ObjC -all_load -fprofile-use -Xlinker -objc_abi_version -Xlinker 2 -lCorePlot-CocoaTouch -weak_framework QuickLook -weak_framework MessageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -object_path_lto -Xlinker /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.lto_temporary.o -o /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator/IQ.app/IQ ld: warning: section __DATA/__objc_imageinfo__DATA has unexpectedly large size 368 in /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.lto_temporary.o Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /SourceCache/ld64/ld64-123.2/src/ld/ld.hpp, line 573. 0 0x10001286c __assert_rtn + 76 1 0x10008c71c ld::tool::OutputFile::addressOf(ld::Internal const&, ld::Fixup const*, ld::Atom const**) + 188 2 0x10008ed58 ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 2840 3 0x10008b62e ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 814 4 0x10008431c ld::tool::OutputFile::write(ld::Internal&) + 156 5 0x100012e3f main + 1247 6 0x100000e14 start + 52 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 
+6
ios xcode ipad llvm static-libraries
source share
3 answers

An error is an internal error that occurs when the LLVM compiler does not find the character that it expects to find during the final optimization of the connection time. A common reason is linking to a static library that had some significant symbol removed (when linking the static library itself, there would be no error, although it would be if the library were linked dynamically).

Despite the fact that there is no error in LLVM indicating a true error, the correct correction is that the static libraries insert into the text all the characters that they should use when linking. Try examining the build settings for the static libraries included in the project, making sure that the removal of the associated product (.a file) is either disabled or set only to remove debugging symbols.

If you do not control the creation of a static library, a workaround is to disable connection time optimization in LLVM, although this may result in suboptimal code.

+2
source share

solvable.

This warning and error disappears when I change the build parameter called "C / C ++ Compiler Version" from "LLVM GCC 4.2" to "GCC 4.2".

+4
source share

I get an "unexpectedly large size" only if the assembly setting "Connection time optimization" (LLVM_LTO = YES) is enabled. I recommend leaving it disabled (by default).

+3
source share

All Articles