[PATCH] D116787: [llvm-readobj][MachO] Add option to sort the symbol table before dumping (MachO only, for now).

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 00:29:17 PST 2022


jhenderson added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-readobj.rst:111
+
+ Sort symbols before displaying symtab
+
----------------



================
Comment at: llvm/test/tools/llvm-readobj/MachO/stabs-sorted.yaml:54
+
+--- !mach-o
+FileHeader:
----------------
oontvoo wrote:
> jhenderson wrote:
> > As you've now got a separate YAML, I'd change your symbol names to emphasise the differences, rather than being basically unrelated cruft copied over from the old test.
> Actually the names are quite realistic and  are representative enough for what I wanted to test. I'm not really seeing why they need to change.
It's more about clarity of test. By using "realistic" symbol names, you're actually making it a little harder to see what is important in the testing, as people may just assume they are cruft leftover from how the test input was generated. On the other hand, if you used names like "a", "b", "c" etc, it would be very obvious if they are/are not sorted.


================
Comment at: llvm/tools/llvm-readobj/Opts.td:40
 def section_symbols : FF<"section-symbols", "Display symbols for each section shown. This option has no effect for GNU style output">;
+def sort_symbols : FF<"sort-symbols", "Sort symbol before displaying symtab">;
 def stack_sizes : FF<"stack-sizes", "Display contents of all stack sizes sections. This option has no effect for GNU style output">;
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116787



More information about the llvm-commits mailing list