<p dir="ltr">It should work and this looks like my fault with the pub names patch. I'll get it in the morning if no one else has by then. </p>
<div class="gmail_quote">On Aug 23, 2013 12:11 AM, "Alexey Samsonov" <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi!<div><br></div><div>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)?</div>

<div><br></div><div><div>$ cat a.cc</div><div>int foo(int x) {</div><div>  return x + 1;</div><div>}</div><div><br></div><div>int main() {</div><div>  return foo(42);</div><div>}</div></div><div><br></div><div><br></div>
<div>
<div><div>$ ./bin/clang++ -gsplit-dwarf a.cc</div><div>/tmp/a-005b1a.o(.debug_pubnames+0x6): error: undefined reference to '.L.debug_info_begin0'</div><div>clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)</div>

</div><div><br></div><div><br></div><div><div>$ ./bin/clang++ -gsplit-dwarf a.cc -###</div><div>clang version 3.4 (189088)</div><div>Target: x86_64-unknown-linux-gnu</div><div>Thread model: posix</div><div> "/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"</div>

<div> "/usr/bin/objcopy" "--extract-dwo" "/tmp/a-b567ef.o" "a.dwo"</div><div> "/usr/bin/objcopy" "--strip-dwo" "/tmp/a-b567ef.o"</div><div> "/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"</div>

</div><div><br></div><div><div>$ ld --version</div><div>GNU gold (GNU Binutils for Ubuntu 2.22) 1.11</div></div><div><div>$ objcopy --version</div><div>GNU objcopy (GNU Binutils) 2.23.2</div></div><div><br></div>-- <br><div>

Alexey Samsonov, MSK</div>
</div></div>
</blockquote></div>