[LLVMbugs] [Bug 18080] New: ARM integrated assembler fails to parse the symbol variants it generates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Nov 27 16:18:01 PST 2013
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: unassignedbugs at nondot.org
Reporter: dpeixott at codeaurora.org
CC: llvmbugs at cs.uiuc.edu
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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131128/da6e414e/attachment.html>
More information about the llvm-bugs
mailing list