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

    <tr>
        <th>Summary</th>
        <td>
            Surface better error information for “function named more than once” in Wasm linking
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          j-f1
      </td>
    </tr>
</table>

<pre>
    I’m trying to debug an issue where wasm-ld from emscripten fails with the error `error: ../lib/.libs/libosp.dylib: function named more than once`. That error is raised here:

https://github.com/llvm/llvm-project/blob/72073fc95cd4793a853925ddc8cc3fb2118808a5/llvm/lib/Object/WasmObjectFile.cpp#L481-L482

It’s really hard to debug what’s going wrong without more detail — would it be possible to surface some information about what the name of the function is, where in the file the issue is occurring, and where the previous naming occurred in this error message?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU02vpDYQ_DXm0nrI2HgGDhxe9mWklVbKIZFytnEDvTE2ss2O5t9HZni7c4qUC_ijVO6uqtYp0ewRB6Z-Y-qj0nteQhy-v01NZYJ9DF_Z74J1nPX9Cjk-yM-QA1g0-wzaA6W0I9wXjAh3ndY3Z2GKYQVc0xhpy-hh0uQS3CkvkBcEjDFEYBd-LJh8h7pm4ubIMHGrHZn03IW01fZRjuU7TLsfMwUPXq9oYQ0RIS_aQ_Ajsguv4a9F55ObEkRNCS2Uuph8Z_yD8fO75LylciZuTNxmystu6jGs5VH34_P3tsXwHcfMxM24UCq7Cn6V09ir0bbXXupOyV4oa8duHOVkRNN0He-0euE5OvrDnDx_67Q-NzdyWI_bxoT81nbN27e2E68lfs0_RU8QUTv3gEVH-0v5-6JfMXMovtxjKF_KS9jzUyKLWZODT2gL97A7C5TBIGwhJTIOC23a46RHhBRWBPJTiKs-9NamkJX3DvOK_BCmY_3TE0pMfDlDQP55R4V3wTMglCCM4x4j-blgtbcnvmC2iD8o7Kmwl0aeULRPMkqnrSumpGdk8lbZQdpe9rrCoblce9nyplHVMnS8U7JtLtzwphdX3nei0-KqVDuKVhtZ0SC4kFyKct8oVVuh0FrZ6K7hl7adWMtx1eTqYmId4lwdHQyXRilVOW3QpWNYhPB4f7bHhCizE4cjOWafE2u5o5TTL5ZM2eHw5ymzwZwxfsb1Re6pjMbp1pf_Dv2J-igqlWyBI_8P-bnaoxv-d8qPRsrkHY3-GwAA__-6kFXf">