[PATCH] D73484: [llvm-readobj] - Improve error message reported by DynRegionInfo.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 06:13:25 PST 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test:360
+##    a location and an entity size of the dynamic symbol table from the section header.
+##    The code uses sizeof(Elf_Sym) for an entity size, so it can't be incorrect and
+##    the message printed is a bit shorter.
----------------
jhenderson wrote:
> Aside: why is it not using the DT_SYMENT dynamic tag?
I do not know. Perhaps we want to fix this. Also, I think this area is not well tested.
I can investigate it in a follow-up.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:140-141
+  std::string SizePrintName = "data size";
+  /// Entity size name. Used for error reporting. We do not print the text with
+  /// the assumption about an invalid entity size if this field is empty.
+  StringRef EntSizePrintName = "entity size";
----------------
jhenderson wrote:
> ELF gabi refers to items in sections with non-zero sh_entsize as "entries", so  this should probably be "Entry size name".
> 
> Change the last sentence to "If this field is empty, errors will not mention the entry size."
I've updated "entity"->"entry" in the error text too.


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

https://reviews.llvm.org/D73484





More information about the llvm-commits mailing list