[PATCH] D95916: DebugInfo/Symbolize: Allow STT_NOTYPE/STT_GNU_IFUNC symbols for .symtab symbolization

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 09:52:13 PST 2021


MaskRay marked an inline comment as done.
MaskRay added a comment.

In D95916#2538703 <https://reviews.llvm.org/D95916#2538703>, @jhenderson wrote:

> Some time ago, I filed https://bugs.llvm.org/show_bug.cgi?id=45729, which I think this will address?

Seems so.

> Is there a particular reason to pay any attention to the symbol type at all, other than to pick the "best" one if there are multiple candidates? Even if someone is using DATA or CODE, I'm not sure we should pay any attention to the symbol type - just pick the symbol that matches the requested address, possibly restricting it to one in the matching symbol. (I haven't checked GNU behaviour to make sure what I'm saying makes sense compared to addr2line, mind you).

I think `ST_Function/ST_Data` were designed for BFD types. They are not good use outside of tools such as llvm-objdump/llvm-nm. I only kept `ST_Data` just to not duplicate `Objects` entries in `Functions`.
I am mildly confident that being more permissive won't regress other binary formats' behavior. For ELF there is some interesting case to consider, the relevant test coverage can be added separately.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95916



More information about the llvm-commits mailing list