https://bugs.llvm.org/show_bug.cgi?id=34007

            Bug ID: 34007
           Summary: Regression(r309526): DWARF info may be corrupt;
                    offsets in a range list entry are in different
                    sections
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedb...@nondot.org
          Reporter: nicolaswe...@gmx.de
                CC: llvm-bugs@lists.llvm.org

Created attachment 18880
  --> https://bugs.llvm.org/attachment.cgi?id=18880&action=edit
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
http://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/6f7741c4222de05cd5f2fbb9f02d34f76e5a3134/debian_jessie_i386_sysroot.tar.xz
and extract it to build/linux/debian_jessie_i386-sysroot to get that sysroot
and
http://commondatastorage.googleapis.com/chromium-binutils/0cb5726d9701f8be6a81b199899de1de552922f2
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).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to