<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Regression(r309526): DWARF info may be corrupt; offsets in a range list entry are in different sections"
   href="https://bugs.llvm.org/show_bug.cgi?id=34007">34007</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression(r309526): DWARF info may be corrupt; offsets in a range list entry are in different sections
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18880" name="attach_18880" title="test.ii">attachment 18880</a> <a href="attachment.cgi?id=18880&action=edit" title="test.ii">[details]</a></span>
test.ii

test.ii is cxa_default_handlers.cpp from libc++abi after preprocessing.

Compile like so:

../../llvm-build-nolibcxx/bin/clang++ -fno-strict-aliasing
--param=ssp-buffer-size=4 -fstack-protector  -funwind-tables -fPIC -pipe
-Bthird_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -m32
-msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -mstack-alignment=16
-mstackrealign -O0 -fno-omit-frame-pointer -gdwarf-3  -g2 -ggnu-pubnames
-gsplit-dwarf -fvisibility=hidden -fPIC -fstrict-aliasing  -std=gnu++14
-fvisibility-inlines-hidden -frtti -x c++ -c test.ii -o test.o


Then link like so:

../../llvm-build-nolibcxx/bin/clang++ -shared -Wl,--fatal-warnings -fPIC
-Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed
-lpthread -Wl,--as-needed -fuse-ld=gold
-Bthird_party/binutils/Linux_x64/Release/bin  -nodefaultlibs -m32
-Wl,--gdb-index --sysroot=build/linux/debian_jessie_i386-sysroot  test.o
third_party/binutils/Linux_x64/Release/bin/ld.gold: warning: test.o: DWARF info
may be corrupt; offsets in a range list entry are in different sections
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:29: error:
undefined reference to '__cxa_get_globals_fast'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:53: error:
undefined reference to '__cxa_demangle'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:0: error:
undefined reference to 'typeinfo for std::exception'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:63: error:
undefined reference to 'abort_message'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:68: error:
undefined reference to 'abort_message'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:73: error:
undefined reference to 'abort_message'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:77: error:
undefined reference to 'abort_message'
buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp:84: error:
undefined reference to 'std::terminate()'
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)


The undefined references are fine (an artifact of reducing this to one file),
but the "DWARF info may be corrupt" is not good.

Download
<a href="http://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/6f7741c4222de05cd5f2fbb9f02d34f76e5a3134/debian_jessie_i386_sysroot.tar.xz">http://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/6f7741c4222de05cd5f2fbb9f02d34f76e5a3134/debian_jessie_i386_sysroot.tar.xz</a>
and extract it to build/linux/debian_jessie_i386-sysroot to get that sysroot
and
<a href="http://commondatastorage.googleapis.com/chromium-binutils/0cb5726d9701f8be6a81b199899de1de552922f2">http://commondatastorage.googleapis.com/chromium-binutils/0cb5726d9701f8be6a81b199899de1de552922f2</a>
and put it at third_party/binutils/Linux_x64/Release/bin to get that gold (it's
I think a prebuilt of the latest stable gold, maybe with some cherry-picked
patches).</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>