xjsXjtu
xjsXjtu

Reputation: 161

How to generate link map file for Clang on iOS?

I know for armcc(armlink), I can use -L--map flag to generate a map file. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0474c/BABDJCAA.html

But for clang compiler and linker, I tried all these flags, but none of them can generate link map file:

flag1: xcrun -sdk iphoneos clang -arch armv7s -Wl,-dead_strip -Wl,--map -o exe objtest.o libtest.a

flag2: xcrun -sdk iphoneos clang -arch armv7s -Wl,-dead_strip -Wl,-M -o exe objtest.o libtest.a

flag3: xcrun -sdk iphoneos clang -arch armv7s -Wl,-dead_strip -Wl,-m -o exe objtest.o libtest.a

What's wrong with my flag? Thanks in advance.

Upvotes: 1

Views: 5731

Answers (1)

thakis
thakis

Reputation: 5909

Try -Wl,-map,output.map, that should do it.

Upvotes: 9

Related Questions