[PATCH] D62179: [llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC header.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 03:32:46 PDT 2019
grimar marked an inline comment as done.
grimar added inline comments.
Comment at: tools/llvm-readobj/ELFDumper.cpp:1486
- reinterpret_cast<const Elf_Hash *>(toMappedAddr(Dyn.getPtr()));
+ reinterpret_cast<const Elf_Hash *>(toMappedAddr("DT_HASH", Dyn.getPtr()));
> Instead of constants like `"DT_HASH"` for all these changes, can you pass in `Dyn.d_tag` instead and use `getTypeString()` within `toMappedAddr` to print the string? (Passing `Obj->getHeader()->e_machine` by lambda capture). That will keep all these calls identical.
Oh, cool, I did not know we have something like `getTypeString()` here (or perhaps forgot about that) , thanks!
CHANGES SINCE LAST ACTION
More information about the llvm-commits