[PATCH] D131290: [llvm-objdump] Create name for fake sections

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 08:11:40 PDT 2022


jhenderson added inline comments.


================
Comment at: llvm/include/llvm/Object/ELF.h:778
 
-  for (auto Phdr : *PhdrsOrErr) {
-    if (!(Phdr.p_type & ELF::PT_LOAD) || !(Phdr.p_flags & ELF::PF_X))
+  FakeSectionStrings.append(StringRef("\0", 1));
+  for (auto [Idx, Phdr] : llvm::enumerate(*PhdrsOrErr)) {
----------------
namhyung wrote:
> jhenderson wrote:
> > Do you actually need this?
> Yep, Idx is a part of the section name.
I wasn't referring to MaskRay's suggestion. I was referring to the line that's actually highlighted with this comment (i.e. line 778 in this diff).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131290



More information about the llvm-commits mailing list