[PATCH] D59989: [llvm-objcopy]Allow llvm-objcopy to be used on an ELF file with no section headers

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 12:12:12 PDT 2019


rupprecht accepted this revision.
rupprecht added inline comments.


================
Comment at: tools/llvm-objcopy/ELF/Object.h:234
+      : Writer(Obj, Buf), WriteSectionHeaders(WSH) {
+    if (!Obj.HadShdrs)
+      WriteSectionHeaders = false;
----------------
Slightly simpler:
```
  ELFWriter(Object &Obj, Buffer &Buf, bool WSH)
      : Writer(Obj, Buf), WriteSectionHeaders(WSH && Obj.HadShdrs) {}
```


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59989





More information about the llvm-commits mailing list