[PATCH] D76425: [llvm-readobj] Allow syms from all sections to match stack size entries

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 03:46:05 PDT 2020


jhenderson added a comment.

(Woops, one comment didn't get added yesterday).



================
Comment at: llvm/test/tools/llvm-readobj/ELF/stack-sizes.test:163
+  ## If two symbols have the same value, the first is picked, regardless of
+  ## sh_link.
+  - Name:    other_end
----------------
grimar wrote:
> BTW, does would it be better to print all of candidates?
> e.g:
> 
> 
> ```
> Size   Function
> 16     other
> 32     other_end/foo/bar
> ```
> 
I don't think like that is a good idea, since there may be people parsing the output and the current version is quite easy to parse.

There's probably a case for marking them on separate lines though, sharing the same value, although that would require trawling the entire symbol table for every entry (O(n^2)) rather than up to the first symbol, which would therefore be somewhat slower.

That would be more general too, and ensure that ICF-ed functions and other aliases are handled nicely. Consequently, I think that's outside the scope of this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76425





More information about the llvm-commits mailing list