[PATCH] D62620: [llvm-objcopy] Fix SHT_GROUP ordering.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 19:46:42 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/ELF/Object.cpp:1640
 void Object::sortSections() {
-  // Put all sections in offset order. Maintain the ordering as closely as
-  // possible while meeting that demand however.
+  // Use stable_sort to maintain the original ordering as closely as possible.
   llvm::stable_sort(Sections, [](const SecPtr &A, const SecPtr &B) {
----------------
@jakehehrlich I can't find a use site of `objcopy::elf::Object::Sections` that requires it to be sorted.

I guess we can probably just delete this function and fix the 5 or 6 tests that check the section order.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62620





More information about the llvm-commits mailing list