http://llvm.org/bugs/show_bug.cgi?id=18242
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: [email protected]
Reporter: [email protected]
CC: [email protected]
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
-L/home/build/clang/dev/testbld/builds/Release+Asserts/lib -o
/home/build/clang/dev/testbld/builds/Release+Asserts/bin/opt
/home/build/clang/dev/testbld/builds/tools/opt/Release+Asserts/AnalysisWrappers.o
/home/build/clang/dev/testbld/builds/tools/opt/Release+Asserts/GraphPrinters.o
/home/build/clang/dev/testbld/builds/tools/opt/Release+Asserts/PrintSCC.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
/home/build/clang/dev/testbld/builds/Release+Asserts/lib/libLLVMPowerPCCodeGen.a:
error adding symbols: Bad value
In the assembly code for PPCJITInfo.o, there is:
.section ".opd","aw",@progbits
This is from: llvm-dev.src/lib/Target/PowerPC/PPCJITInfo.cpp
asm(
".text\n"
".align 2\n"
".globl PPC64CompilationCallback\n"
".section \".opd\",\"aw\",@progbits\n"
".align 3\n"
"PPC64CompilationCallback:\n"
".quad .L.PPC64CompilationCallback,.TOC.@tocbase,0\n"
".size PPC64CompilationCallback,24\n"
".previous\n"
".align 4\n"
".type PPC64CompilationCallback,@function\n"
".L.PPC64CompilationCallback:\n"
# else
--
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