ld:警告:section __DATA / __ objc_imageinfo__DATA具有意外的大尺寸 [英] ld: warning: section __DATA/__objc_imageinfo__DATA has unexpectedly large size

查看:495
本文介绍了ld:警告:section __DATA / __ objc_imageinfo__DATA具有意外的大尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道这个警告意味着什么?接下来是错误:

Does anyone know what this warning means? It is followed by the error:

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2失败退出代码1

这是iPad的Xcode项目。我只为编译模拟器而不是设备编译时才看到这个。我已将静态库(* .a)链接到此项目,这是我认为失败的地方。此外,它曾经在模拟器上运行没有问题,我不知道发生了什么变化。

This is an Xcode project for the iPad. I only see this when I compile for the simulator, not the device. I have linked a static library (*.a) to this project and that is where I think this is failing. Also, it used to run on the simulator without an issue and I am not sure what changed.

所有编译器输出:

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


推荐答案

错误是出现的内部错误当LLVM编译器未找到期望在最终链接时优化阶段期间找到的符号时发生rs。一个常见的原因是链接一个静态库,它已经剥离了一些基本符号(在静态库本身的链接过程中不会产生错误,尽管如果库是动态链接的话)。

The error is an internal error that appears to occur when the LLVM compiler isn't finding a symbol that it expects to find during the final link-time optimization phase. A common cause is linking against a static library which has had some essential symbol stripped (no error would be produced during the linking of the static library itself, although one would if the library was linked dynamically).

虽然LLVM还没有报告错误的错误,但正确的解决方法是确保静态库提供链接期间应该使用的所有符号。尝试检查项目中包含的静态库的构建设置,确保禁用链接产品(.a文件)的剥离或设置为仅剥离调试符号。

Although there is also a bug with LLVM not reporting the true error, the correct fix is to make sure that static libraries contribute all the symbols they should during linking. Try examining the build settings for static libraries included in the project, making sure that stripping of the linked product (the .a file) is either disabled or set to strip debug symbols only.

如果您不控制静态库的构建,则解决方法是禁用LLVM中的链接时优化,尽管这可能会导致生成次优代码。

If you don't control the building of the static library, a workaround is to disable link-time optimization in LLVM, although this may result in the production of sub-optimal code.

这篇关于ld:警告:section __DATA / __ objc_imageinfo__DATA具有意外的大尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆