<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Inline assembly in C++ fails to link on leppc Debian ABI 0.2"
   href="http://llvm.org/bugs/show_bug.cgi?id=18242">18242</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inline assembly in C++ fails to link on leppc Debian ABI 0.2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: PowerPC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>stevchen@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>