[llvm] [llvm-objdump][ELF] Enhancing llvm-objdump stability and error handling(#86612) (PR #125679)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 21:04:47 PST 2025


================
@@ -235,6 +252,12 @@ template <class ELFT> void ELFDumper<ELFT>::printDynamicSection() {
       Expected<StringRef> StrTabOrErr = getDynamicStrTab(Elf);
       if (StrTabOrErr) {
         const char *Data = StrTabOrErr->data();
+        if (Dyn.getVal() > StringTableSize) {
+          reportWarning("Invalid string table offset", Obj.getFileName());
----------------
MaskRay wrote:

do not capitalize the message. llvm-objdump follows this documented convention https://llvm.org/docs/CodingStandards.html#error-and-warning-messages

`>` => `>=`

https://github.com/llvm/llvm-project/pull/125679


More information about the llvm-commits mailing list