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

Jim Grosbach grosbach at apple.com
Mon Nov 26 17:53:52 PST 2012


On Nov 26, 2012, at 5:36 PM, Joe Abbey <joe.abbey at gmail.com> wrote:

> Jim,
> 
> Without going into too much detail, current llc produced ios-arm assembly cannot be assembled by Xcode <= 4.4.1.  This is because as of r157062 .data_region directives are being emitted in asm.  The latest and greatest Apple cctools have no issue, but alas... older Xcodes are left in the lurch despite still being in use.

Sure. What I don't understand is why this is desirable. Top of tree LLVM explicitly requires a cctools recent enough to understand its output. If there's obstacles to getting those newer cctools, or other reasons why that's problematic, we should work to solve those problems. That is, I want to solve problems such that we enable and encourage folks to move forwards.

That said, why not just use the integrated assembler? For assembling LLVM output, you're going to have far better success with that than the old cctools assembler. That is, to assemble code, invoke "clang -arch armv7 myfile.s -c" instead of "as -arch armv7 myfile.s".

-Jim

> 
> The intention is to provide a switch to llc to omit the emission of .data_regions so that older assemblers can still proceed.  Since the directive seems primarily useful for introspection tools, it seems harmless to disable.  I've tested this internally and it seems to be the case that the directives are optional, but I'm sure you have a better perspective on the purpose of identifying data regions through Mach-O  load commands.
> 
> As an aside, I'd <3 someone to update https://developer.apple.com/library/mac/#documentation/developertools/conceptual/MachORuntime/Reference/reference.html
> 
> Joe
>  
>> 
>> I don't understand why this is desirable. Can you elaborate? What's the use case?
>> 
>>> I propose the following patch to disable data region directive generation:
>>> 
>>>   -disable-data-region-directives         - Disable data region directives which older assemblers reject
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121126/6f745eea/attachment.html>


More information about the llvm-commits mailing list