[LLVMbugs] [Bug 18242] New: Inline assembly in C++ fails to link on leppc Debian ABI 0.2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 13 10:17:11 PST 2013


            Bug ID: 18242
           Summary: Inline assembly in C++ fails to link on leppc Debian
                    ABI 0.2
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: stevchen at ca.ibm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

On little-endian PowerPC Debian API 0.2, the opcode opd is no longer allowed.
Normally when a source is compiled with GCC, GCC will not generate these
opcodes; however, some sources for building LLVM libraries unfortunately use
inline asm which hardcodes the section odp.

g++  -O3 -rdynamic -Wl,-R -Wl,'$ORIGIN/../lib'
-L/home/build/clang/dev/testbld/builds/Release+Asserts/lib    -o
/home/build/clang/dev/testbld/builds/tools/opt/Release+Asserts/opt.o  \
        -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMSelectionDAG
-lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMPowerPCDesc
-lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMCppBackendCodeGen
-lLLVMCppBackendInfo -lLLVMipo -lLLVMVectorize -lLLVMObjCARCOpts
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMTransformUtils
-lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMIRReader
-lLLVMAsmParser -lLLVMBitWriter -lLLVMBitReader -lLLVMCore -lLLVMSupport   -lz
-lpthread -ldl -lm
/usr/bin/ld.bfd.real: .opd not allowed in ABI version 2
error adding symbols: Bad value

In the assembly code for PPCJITInfo.o, there is:
.section ".opd","aw", at progbits

This is from: llvm-dev.src/lib/Target/PowerPC/PPCJITInfo.cpp
    ".align 2\n"
    ".globl PPC64CompilationCallback\n"
    ".section \".opd\",\"aw\", at progbits\n"
    ".align 3\n"
    ".quad .L.PPC64CompilationCallback,.TOC. at tocbase,0\n"
    ".size PPC64CompilationCallback,24\n"
    ".align 4\n"
    ".type PPC64CompilationCallback, at function\n"
#  else

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/20131213/69a75cc1/attachment.html>

More information about the llvm-bugs mailing list