[PATCH] D87612: [llvm-readobj][test] - Improve section-symbols.test

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 01:28:05 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/section-symbols.test:1
-## ELF section symbols use the section names when printing. This test verifies
-## this and also that appropriate things are printed if the section is somehow
-## invalid.
+## ELF section symbols use the corresponding section names when printing for
+## unnamed symbols. This test verifies this and also that appropriate things
----------------



================
Comment at: llvm/test/tools/llvm-readobj/ELF/section-symbols.test:98
+    Type: STT_SECTION
+## Case 5: a valid unnamed section symbol symbol via SHT_SYMTAB_SHNDX.
   - Name: ""
----------------
Ditto below.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/section-symbols.test:115-118
+## Test --relocations option.
+## FIXME: relocations should print section symbol names when them are not empty.
+# RUN: llvm-readobj %t1 --relocations 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=LLVM-RELOCS
+# RUN: llvm-readelf %t1 --relocations 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=GNU-RELOCS
----------------
Is there any reason to do this in a separate run? You could do `llvm-readobj --symbols --relocations` at the same time.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/section-symbols.test:116
+## Test --relocations option.
+## FIXME: relocations should print section symbol names when them are not empty.
+# RUN: llvm-readobj %t1 --relocations 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=LLVM-RELOCS
----------------
I also think that if a name can't be looked up, it shouldn't prevent printing of the relocation. That seems unhelpful to me. Possibly another piece of work, and worth highlighting in the FIXME?


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

https://reviews.llvm.org/D87612



More information about the llvm-commits mailing list