https://llvm.org/bugs/show_bug.cgi?id=23042
Bug ID: 23042
Summary: ARM inline assembly branch cannot reach "static"
functions
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
A brnach in ARM inline assembly cannot reach "static" functions.
---------------------------------------------
static void foo(void) { .... }
void bar(void)
{
__asm ("b foo");
}
---------------------------------------------
linking this with arm-none-eabi-ld fail with: "undefined reference to 'foo'.
However, when using this, everythign works fine:
---------------------------------------------
void bar(void)
{
__asm ("b %0"::"i"(foo));
}
---------------------------------------------
Given that the inline assembler seems well integrated into the compiler, is
there a reason why this is different. Is it possible that __asm ("b foo") could
simply be considered a shortcut form of __asm ("b %0"::"i"(foo)) ?
--
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