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

    <tr>
        <th>Summary</th>
        <td>
            android-ndk-r26c use -pg ld.lld: error: undefined symbol: _mcount
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

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

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

<pre>
    Hi All, 

I want to use the -pg option in LLVM for performance profiling, but I'm encountering an error during linking that indicates _mcount is undefined. Can anyone help me out? Thank you.

android-ndk-r26c-linux/android-ndk-r26c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang -pg simd.c -o simdpg

ld.lld: error: undefined symbol: _mcount


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkk9vnDAQxT-NuYxAxngX9uDDNhFqpPRW9RoZ2wvumjHynzT77SuzURPl1guYwe9p3m9GxmhnNEaQwzdyeKxkTosPYlVXeXMW81s1eX0T3y2cnSPsAQh9JPR8fz7BH4kJkoccDaTFQL3N4LdkPYJFeH7-9QMuPsBmwsWHVaIysAV_sc7iXNymnOCJsH4Fg8pnTCZYnEEimBB8AJ33b2fxWt5pkQksaqtkMhFe1l0DNkJGbS4WjW7gQSJIvHk0sBi3wWrA50S6EX4uEq9w87n5nEKiDt7qGvW1Duyo6j03YePXH4SNyXunFmkxEjY697oSNm7BTNm6VCpFWb8Nx5cjJ2ycLBYbGdRy5Hfb-t2047VyEuedWLSrbhTUfj9t8-funG6c06Q734mUw7-sEG_r5F2pvaP4rKy06PSpO8nKiLZndOg7PrTVIvjUtbTrlaKdYYcLmwZ9UKdWtafTRI89raxglHHat13LGOe0aaniAx8Og5S9pJ0inJpVWtcUBI0Pc2VjzEachp6zysnJuLhvFGOlecbKagVRbtdTniPh1NmY4oc-2eSM-Ep836tC6P8oVDk4saS0RdKdCRsJG2ebljw1yq8fg9vb2YL_bVQZ3h6hzPWe4lWwvwEAAP__qz0C6Q">