[llvm-commits] [PATCH][RFC] Disable data region directives

Chris Lattner clattner at apple.com
Tue Nov 27 16:56:36 PST 2012


On Nov 26, 2012, at 7:35 PM, Joe Abbey <jabbey at arxan.com> wrote:

>> Why are you trying to use mainline llvm with an old Xcode assembler?  
> 
> We're a tool vendor, providing software protection of mobile applications.  
> 
> Our product, EnsureIT, consumes bitcode, mutates it, and passes it to mainline llc to lower to assembly.  Next, we do some hand waving and invoke the Xcode assembler.  Finally, we perform linking and then more secret sauce.  We use mainline llvm to support developer preview Xcode.  Additionally, we use mainline llvm to support this process using Xcode 4.5, Xcode 4.4, and Xcode 4.3.  
> 
> During the hand waving, I have an opportunity to manually remove the directives, and that will work.  My hope is that other users could benefit from selective generation of these optional data region directives.  From my perspective, it is much cleaner to have llc omit the directives when we're integrated with Xcode 4.4 and Xcode 4.3.  When we're integrated with modern Xcodes, llc can produce the directives and all is well.
> 
> I can definitely get behind upwards and onwards.  At the same time, I have to support the past.  As such, I think this is a low-impact change.  There's a precedence of similar options like -disable-cfi and -disable-dot-loc, and this patch is following in that mold.

If you're trying to do that, I'd strongly recommend using llvm-mc as your assembler instead of being tied to whatever assembler Xcode ships.  /usr/bin/as in Xcode doesn't support many things the integrated assembler in the compiler does - for example AVX instructions.  This may change in the future, but there is no reason to be dependent on it, just use the LLVM assembler which will certainly match what "llc" produces.

> During the hand-waving we add STABS.  LLVM has no STABS support.  The Xcode assembler does.  Adding STABS support to LLVM is a TODO so that we can use the integrated assembler.  :)

That is horrible!  Stabs must die! :)

-Chris



More information about the llvm-commits mailing list