<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 --- - [powerpc-darwin8] stage-2 asan_mac.cc.o causes linker error: unknown flags (type) of section 11 (__TEXT,__literal16) in load command 0"
   href="http://llvm.org/bugs/show_bug.cgi?id=18237">18237</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[powerpc-darwin8] stage-2 asan_mac.cc.o causes linker error: unknown flags (type) of section 11 (__TEXT,__literal16) in load command 0
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>fang@csl.cornell.edu
          </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 powerpc-darwin8, during a stage-2 build of compiler-rt, using stage-1 clang
(built with gcc-4.0), I get a linker error:

[100%] Built target RTAsanTest.ppc64
ld: CMakeFiles/RTAsan.osx.dir/asan_mac.cc.o unknown flags (type) of section 11
(__TEXT,__literal16) in load command 0
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit
command failed
clang-3.5: error: linker (via gcc) command failed with exit code 1 (use -v to
see invocation)
make[2]: *** [lib/clang/3.5/lib/darwin/libclang_rt.asan_osx_dynamic.dylib]
Error 1
make[1]: ***
[projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan_osx_dynamic.dir/all]
Error 2
make: *** [all] Error 2

Verbosely, asan_mac.cc is compiled with:

% /Volumes/Isolde/sources/LLVM-svn/gcc40-cmake-build/bin/clang++
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 -DASAN_HAS_EXCEPTIONS=1
-DASAN_NEEDS_SEGV=1 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -I/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
-fno-common -no-integrated-as -fno-dwarf2-cfi-asm -fPIC
-fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings
-pedantic -Wno-long-long -Wnon-virtual-dtor -isysroot
/Developer/SDKs/MacOSX10.4u.sdk
-I/Users/fang/local/src/LLVM-svn/gcc40-stage2-build/projects/compiler-rt/lib/asan
-I/Users/fang/local/src/LLVM-svn/llvm/projects/compiler-rt/lib/asan
-I/Users/fang/local/src/LLVM-svn/gcc40-stage2-build/include
-I/Users/fang/local/src/LLVM-svn/llvm/include
-I/Users/fang/local/src/LLVM-svn/llvm/projects/compiler-rt/lib/asan/.. -fPIC
-fno-builtin -fno-exceptions -fomit-frame-pointer -fvisibility=hidden -O3
-Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti
-mmacosx-version-min=10.4 -o CMakeFiles/RTAsan.osx.dir/asan_mac.cc.o -c
/Users/fang/local/src/LLVM-svn/llvm/projects/compiler-rt/lib/asan/asan_mac.cc

The same linking error occurs when recompiled down to -O1, but -O0 works.

Will attach relevant .s files in a moment.</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>