[PATCH] D33964: [LLVM][llvm-objcopy] Added basic plumbing to get things started

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 10:54:30 PDT 2017


jakehehrlich marked 10 inline comments as done.
jakehehrlich added inline comments.


================
Comment at: tools/llvm-objcopy/Object.cpp:165
+      return A->Addr < B->Addr;
+    return A->Index < B->Index;
+  };
----------------
jhenderson wrote:
> I personally would think that using offset to determine order may be simpler, as it removes the need to test for SHF_ALLOC. Also, sections don't have to appear in the file in the order that they appear in the section header table, so I'd only use Index as a fall-back if you get two sections with the same offset.
This is a really good idea. Thank you!


https://reviews.llvm.org/D33964





More information about the llvm-commits mailing list