[LLVMdev] gsplit-dwarf broken on Linux?

Alexey Samsonov samsonov at google.com
Fri Aug 23 00:11:48 PDT 2013


Hi!

Quick question - do you know if recent commits could cause this error, or I
should go to bisect/debug this? Do we have tests that check that
-gsplit-dwarf succeeds (i.e. compile and link step work)?

$ cat a.cc
int foo(int x) {
  return x + 1;
}

int main() {
  return foo(42);
}


$ ./bin/clang++ -gsplit-dwarf a.cc
/tmp/a-005b1a.o(.debug_pubnames+0x6): error: undefined reference to
'.L.debug_info_begin0'
clang-3.3: error: linker command failed with exit code 1 (use -v to see
invocation)


$ ./bin/clang++ -gsplit-dwarf a.cc -###
clang version 3.4 (189088)
Target: x86_64-unknown-linux-gnu
Thread model: posix
 "/llvm_build_clang/bin/clang-3.3" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-main-file-name" "a.cc" "-mrelocation-model" "static" "-mdisable-fp-elim"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
"-target-cpu" "x86-64" "-g" "-backend-option" "-split-dwarf=Enable"
"-resource-dir" "/llvm_build_clang/bin/../lib/clang/3.4"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-linux-gnu/c++/4.6"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/llvm_build_clang/bin/../lib/clang/3.4/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-fdeprecated-macro" "-fdebug-compilation-dir"
"/llvm_build_clang" "-ferror-limit" "19" "-fmessage-length" "211"
"-mstackrealign" "-fobjc-runtime=gcc"
"-fobjc-default-synthesize-properties" "-fcxx-exceptions" "-fexceptions"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-slp" "-o"
"/tmp/a-b567ef.o" "-x" "c++" "a.cc" "-split-dwarf-file" "a.dwo"
 "/usr/bin/objcopy" "--extract-dwo" "/tmp/a-b567ef.o" "a.dwo"
 "/usr/bin/objcopy" "--strip-dwo" "/tmp/a-b567ef.o"
 "/usr/bin/ld" "-z" "relro" "--hash-style=gnu" "--build-id"
"--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker"
"/lib64/ld-linux-x86-64.so.2" "-o" "a.out"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o"
"-L/usr/lib/gcc/x86_64-linux-gnu/4.6"
"-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu"
"-L/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/x86_64-linux-gnu"
"-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.." "-L/lib" "-L/usr/lib"
"/tmp/a-b567ef.o" "-lstdc++" "-lm" "-lgcc_s" "-lgcc" "-lc" "-lgcc_s"
"-lgcc" "/usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o"
"/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o"

$ ld --version
GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
$ objcopy --version
GNU objcopy (GNU Binutils) 2.23.2

-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130823/33166e2b/attachment.html>


More information about the llvm-dev mailing list