http://llvm.org/bugs/show_bug.cgi?id=18080

            Bug ID: 18080
           Summary: ARM integrated assembler fails to parse the symbol
                    variants it generates
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The integrated assembler for ARM fails to parse the assembly it generates for
symbol variants (e.g. foo(plt)). This is a problem for even a simple hello
world in c++

  #include <iostream>
  void foo() {
    std::cout << "Hi";
  }

because of the static initializer used for global iostream objects:
http://llvm.org/docs/FAQ.html#what-is-this-llvm-global-ctors-and-global-i-a-stuff-that-happens-when-i-include-iostream

The assembly that clang generates includes a section like this:

  .section        .init_array,"aw",%init_array
  .align  2
  .long   _GLOBAL__I_a(target1)

but when we try to parse this assembly, we get an error:

t.s:91:20: error: unexpected token in directive
        .long   _GLOBAL__I_a(target1)
                            ^
The problem is that the asm parser only has support for symbol variants that
are separated from the symbol by an '@' (e.g. foo@plt). The arm assembly (at
least on linux) uses parens to separate the symbol from its variant (e.g.
target1 in this case).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to