<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61355>61355</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc] duplicate symbol: __dso_handle
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            sivachandra
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kaladron
      </td>
    </tr>
</table>

<pre>
    While building a libc with a sysroot, I got the following error:

```jeffbailey@stratonimbus:/tmp$ ~/Programming/sysroot/bin/clang -static main.c
ld.lld: error: duplicate symbol: __dso_handle
>>> defined at start.cpp:27 (/usr/local/google/home/jeffbailey/Programming/gittree/llvm-project/libc/startup/linux/x86_64/start.cpp:27)
>>> /usr/local/google/home/jeffbailey/Programming/sysroot/lib/crt1.o:(__dso_handle)
>>> defined at crtbegin.c
>>> /usr/local/google/home/jeffbailey/Programming/sysroot/lib/clang/17/lib/x86_64-unknown-linux-gnu/clang_rt.crtbegin.o:(.data+0x0)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
jeffbailey@stratonimbus:/tmp$```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VMtu2zAQ_BrqQligqYelgw5JUwG99dajsXxIYkKRBh-Ofem3F5RsJU0OLVAUIGyAIrkzszML3qvRSNmh6hFR6tUZ-ARGOECUouopgxgm67oX0CCcNRmz4tr9mJSWmEWlhTIjBqwV4_hVhQkD9lfvrA2IfsHf8GgDDpPEg9XavqbD0jnrUPGAyBMi99-arOtZDgMDpeUVlcQHB8EaNbPo0wXah_mEaIl_Itp_d3Z0MM_KjIj2W82eKYNozzWYEe98gKA4nkGZnK-ltMi1Fqh42IBgEU9acQgS--vMrE57x6Pw9piU0PKGsfi6LizkoIwUGAL2AVzI-emEigd6wIg2iPbRO0R7bTloRPvR2lFLRPvJzunvHcWPLEYVgpPpkNbneXdy9lnyRCrJm1imavG0bJh4QbS_NPWxLu-fNiCIth9B_wuuN3W1YkldF_a5XVrS_CbU57LvtOIuMDm-deI_YUudR7TfH7atVaRdNC_Gvprdot1uNPF--piUu4O70coFBED0kVzIxmp9-r1ztDIv0mFu5xmMwEOCKNYcyIsKmFsh8T7ZInqJd2ccLPZSYmXOlkNQ1myP_5Xzt5ysdzLRFaItWshkt68PTU3qpmmzqeN1AVBWLeFFWwjKGSlZM4iyKoaG1UJkqqOEFqTYU3Io97TNeSFqaNkAspFtRQCVRM6gdJ6cmFs3Zsr7KLt6X1RVpoFJ7W8zYzXnMixctxiXxdGjkmjlg397IKiglzmzXKie_pi7LDrdTSGcbhqsCZkiy7mdbyH5nJUFp0e0X6D-CgAA__-UiZBY">