[PATCH] D75498: [llvm-objdump] Add option to sort symbols during disassembly

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 01:41:28 PST 2020


jhenderson added a comment.

I might be getting the wrong end of the stick here, but since symbol tables have to have local symbols before global symbols already, isn't it possible (indeed quite likely) for linked output symbols to be in a different order other than address order? As far as I know, this ordering requirement is in fact the only requirement in the ELF gABI, and I think we should be writing our tools based on that rather than decisions that some linkers have made. In other words, I think we need to be able to nicely handle symbols in different orders. Whether that really justifies a new option, I'm not sure either way, but it's also worth noting that llvm-nm already provides options to sort the symbols it prints (and indeed does some sorting by default), so I think an argument can be made that there's some prior art here, especially if the switch doesn't introduce much complexity (it doesn't look like it does).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75498





More information about the llvm-commits mailing list