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

    <tr>
        <th>Summary</th>
        <td>
            llvm-symbolizer does not support gnu_debugdata sections.
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          dom-hernandez
      </td>
    </tr>
</table>

<pre>
    llvm-symbolizer does not support symbolization from symbols located in the `gnu_debugdata` section. Support for `gnu_debugdata` has been [implemented in lldb](https://reviews.llvm.org/D66791), but not llvm-symbolizer. This issue arises when symbolizing a stack trace, and the address of the debug symbol needed is inside of the `gnu_debugdata` section of the shared object. This can lead to incomplete stack traces as some debug symbols are simply left blank.

I ran into this issue with a recent versions of `libresolv.so`, as they now contain the `gnu_debugdata` section for minimal debug info. 

We can verify this by using a shared library that includes the `gnu_debugdata` section, and running llvm-symbolizer to symbolize addresses using this library. If we just symbolize using the address of the symbol that is located in the `gnu_debugdata`, we should get undefined symbols.

e.g., we ran into:
```
llvm-symbolizer --obj libresolv.so 0x9093

??
??:0:0
```

If we extract the gnu_debugdata into a file, and use the llvm-symbolizer on that extracted file, we should get the correct symbols. 
```
objcopy --dump-section .gnu_debugdata=/dev/stdout libresolv.so /dev/null | unxz > debug_file
llvm-symbolizer --obj debug_file 0x9093

__res_context_send
??:0:0
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVdFu6jgQ_RrnZUQUHALNQx56L4t0n3elfUROPCHudWzksaH061d2AoVudVspLQTPjM85c-wRROpgEBtW_WDVNhPBD9Y10o6LAZ0RRuJb1lp5abQ-jQu6jK3V6g0dSIsExnqgcDxa5-G6JryyBnpnx_knAm074VGCMuAHBLYuDibsJbbhIIUXbF0AYRfzcvh7Ltdb92ngIAhaRAOs-qHGo8YRzVxba9myasv40-D9kVj5zPiO8Z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