[PATCH] D67094: [llvm-readelf] - Print unknown st_other value if present in GNU output.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 22:57:21 PDT 2019


MaskRay added inline comments.


================
Comment at: test/tools/llvm-readobj/elf-symbol-visibility.test:53
     Other: [ STV_PROTECTED ]
     Binding: STB_GLOBAL
+
----------------
Can the `Other: [ 4 ]` test be added here? I think using one test is fine. The additional YAML test does not make it easier to read.


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:3275
+    Fields[5].Str +=
+        " [<st_other: " + to_string(format_hex(Symbol->st_other, 2)) + ">]";
+
----------------
The description says:

> Prints "[<other>: 0x??]" for symbols which has an additional st_other bits set.

However, the code actually uses `[<st_other: ...>]` (I would favor `[<other:...>]` because it is shorter, if you don't think that confusing)


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

https://reviews.llvm.org/D67094





More information about the llvm-commits mailing list