[PATCH] D70112: [llvm-readobj] - Improve dumping of the SHT_LLVM_LINKER_OPTIONS sections.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 02:08:28 PST 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/elf-linker-options.test:32
+
+## Check we do not attemp to dump a data from outside of the SHT_LLVM_LINKER_OPTIONS section
+## when it contains an incomplete key-value pair.
----------------
attemp -> attempt
a data -> data
outside of -> outside


================
Comment at: llvm/test/tools/llvm-readobj/elf-linker-options.test:39
+# INCOMPLETE: LinkerOptions [
+# INCOMPLETE:   warning: '[[FILE]]': SHT_LLVM_LINKER_OPTIONS is broken: an incomplete key-value pair was found, the last possible key was: "foo"
+# INCOMPLETE: ]
----------------
Should we make these INCOMPLETE-NEXT to show that nothing is printed for the entry? In that case, what do you think about adding a valid pair before to show that earlier valid entries are (not) printed?


================
Comment at: llvm/test/tools/llvm-readobj/elf-linker-options.test:56
+
+## Check we do not attemp to dump a data from outside of the SHT_LLVM_LINKER_OPTIONS section
+## when it is not null-terminated.
----------------
Same comments for this case as above (both comments and check).


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:6038
+              "SHT_LLVM_LINKER_OPTIONS is broken: an incomplete "
+              "key-value pair was found, the last possible key was: \"" +
+              Strings.back() + "\""),
----------------
found, the -> found. The


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

https://reviews.llvm.org/D70112





More information about the llvm-commits mailing list