[PATCH] D95354: [yaml2obj] - Refine how we set the sh_link field. NFCI.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 01:58:06 PST 2021


jhenderson added a subscriber: JDevlieghere.
jhenderson added a comment.

In D95354#2522323 <https://reviews.llvm.org/D95354#2522323>, @grimar wrote:

> It turns out this wasn't NFC, one of LLDB test cases started to crash. 
> I've fixed it in rG2a33b092f5b175a21680b3980ff2019bc1c65b12 <https://reviews.llvm.org/rG2a33b092f5b175a21680b3980ff2019bc1c65b12>.
>
> The difference was that before this patch we set the `sh_link` for symbol tables basing on their names (E.g ".symtab"),
> now we set this field basing on section types (e.g SHT_SYMTAB).
> The mentioned test case has a `.text` section of type `SHT_SYMTAB` and it did not expect to see a sh_link field set it seeems.

Based on my casual reading of that test, I wonder if you found a bug in the tool there - it looks like the intent is for section types to trump section names, which surely should mean the use of sh_link would be correctin this case? Perhaps we should highlight this to the LLDB developers (pinging @JDevlieghere for example).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95354/new/

https://reviews.llvm.org/D95354



More information about the llvm-commits mailing list