[PATCH] D66075: [llvm-readobj][MachO] Fix section type printing

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 06:57:37 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/macho-sections.test:51
+    Sections:
+      - sectname:        ''
+        segname:         ''
----------------
Are all fields required, or can some be omitted? Same goes throughout the YAML.


================
Comment at: llvm/tools/llvm-readobj/MachODumper.cpp:218
+static const EnumEntry<unsigned> MachOSectionTypes[] = {
+  { "Regular"                        , 0x00 },
+  { "ZeroFill"                       , 0x01 },
----------------
Since they exist, you should refer to the values in SectionType enum in MachO.h.


================
Comment at: llvm/tools/llvm-readobj/MachODumper.cpp:227-228
+  { "SymbolStubs"                    , 0x08 },
+  { "ModInitFuncs"                   , 0x09 },
+  { "ModTermFuncs"                   , 0x0A },
+  { "Coalesced"                      , 0x0B },
----------------
ModInitFuncPointers and ModTermFuncPointers would make more sense.


================
Comment at: llvm/tools/llvm-readobj/MachODumper.cpp:234
+  { "DTraceDOF"                      , 0x0F },
+  { "LazyDylibSymbolPoints"          , 0x10 },
+  { "ThreadLocalRegular"             , 0x11 },
----------------
LazyDylibSymbolPointers


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

https://reviews.llvm.org/D66075





More information about the llvm-commits mailing list