Question

I'm develop app using xcode and objective-C. The compiler for C/C++/Objective-C was Apple LLVM 5.1.

In my debug configuration I didn't link with the flag "-WI,-S,-x" and the project can run. In release configuration, with that falg, it comes errors below:

ld: internal error: atom not found in symbolIndex(__Z6initIDIN3sys3msg10MsgTouchUpEEiv) for architecture armv7

Who can tell me what those flag means? or where can I find the document about these flags. I search it in google and visit llvm,clang website, but I didn't find valuable infomation.

Was it helpful?

Solution

The -Wl flag is used to pass flags directly to the linker; therfore:

-S Do not put debug information (STABS or DWARF) in the output file.

-x Do not put non-global symbols in the output file's symbol table. Non-global symbols are useful when debugging and getting symbol names in back traces, but are not used at runtime. If -x is used with -r non-global symbol names are not removed, but instead replaced with a unique, dummy name that will be automatically removed when linked into a final linked image. This allows dead code stripping, which uses symbols to break up code and data, to work properly and provides the security of having source symbol names removed.

(I got this information using man ld within Terminal.app).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top