[LLVMbugs] [Bug 23042] New: ARM inline assembly branch cannot reach "static" functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 26 22:45:39 PDT 2015


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: unassignedclangbugs at nondot.org
          Reporter: axelheider at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150327/30f0e14b/attachment.html>


More information about the llvm-bugs mailing list