Regarding LLVM compiling flag “-mlong-calls” for “Other C Flags” in XCode.

What does this flag mean? How will it be used? For which purpose will need to enable this flag?

Answers


According to the ARM options page for GCC;

Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register. This switch is needed if the target function lies outside of the 64-megabyte addressing range of the offset-based version of subroutine call instruction.

Basically it means that if your binary is small, you'll likely never have a problem with running the default -mno-long-calls and not have to worry about the option.

If the linker gives you the error Relocation truncated to fit: R_ARM_PC24, you've hit the limit of the defaults and need to compile and link your binary using -mlong-calls.


Need Your Help

Public Key exchange between iOS and Java

java ios rsa public-key commoncrypto

I would like to share a public key generated on an iPhone/iPad with an Java based Server or an Android device. On the Java side (Server or Android) I would like to use java.security and libcommonCr...

Boolean Logic Simulator - StackOverflowError

java logic boolean stack-overflow simulator

I'm creating a Boolean logic simulator. I've posted a question regarding the organization and general setup of the application and it's located here: Organizing Simple Boolean Logic Simulator - Ja...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.