[LLVMbugs] [Bug 12913] New: R_ARM_CALL wrongly used for ARM "B" instruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 22 07:17:26 PDT 2012


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

             Bug #: 12913
           Summary: R_ARM_CALL wrongly used for ARM "B" instruction
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: max at duempel.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


(clang 3.1 from Debian sid)

According to the document "ELF for the ARM architecture", R_ARM_CALL applies to
the instructions "BL" and "BLX", while R_ARM_JUMP24 shall be used for "B".

Consider the following code:

__attribute__((noreturn)) void foo();
void bar() { foo(); }

Compile: clang -ccc-host-triple arm-linux -mfloat-abi=soft -c test.c
-march=armv5 -integrated-as

Disassembly (objdump -S):
   c:   eafffffe        b       0 <foo>

Relocation (readelf -r):
0000000c  0000071c R_ARM_CALL        00000000   foo

.. which leads to linker errors such as:

error: unexpected opcode while processing relocation R_ARM_CALL

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list