[PATCH] D77399: [llvm-readobj] - Introduce warnings for cases when unable to read strings from string tables.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 00:29:54 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test:112
+# BAD-STRING-LLVM-NEXT:   0x000000007FFFFFFE USED      Not needed object: [<?>]
+# BAD-STRING-LLVM-NEXT:   0x000000000000000E SONAME    Library soname: [<?>]
+# BAD-STRING-LLVM-NEXT: warning: '[[FILE]]': string table at offset 0xb0: unable to read the string at 0xb7, it goes past the end of the table (0xb1)
----------------
It might be worth a comment here saying why the warning isn't printed in this case, sae as below.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test:133
+# BAD-STRING-GNU-NEXT:   0x000000007ffffffe (USED)      Not needed object: [<?>]
+## Note: there is no "string table at offset 0xb6..." warning here, because it was deduplicated.
+# BAD-STRING-GNU-NEXT:   0x000000000000000e (SONAME)    Library soname: [<?>]
----------------
I'd suggest changing the last bit of this comment to "because it was printed earlier."


================
Comment at: llvm/test/tools/llvm-readobj/ELF/needed-libs.test:5
+# RUN: llvm-readobj --needed-libs %t1 2>&1 \
+# RUN:   | FileCheck %s -DFILE=%t1 --strict-whitespace --check-prefix=NEEDED-LIBS
+# RUN: llvm-readelf --needed-libs %t1 2>&1 \
----------------
Perhaps worth adding --implicit-check-not=warning: here and below?


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

https://reviews.llvm.org/D77399





More information about the llvm-commits mailing list