[PATCH] D49576: [llvm-objcopy] Add basic support for --rename-section

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 20 11:05:56 PDT 2018


jakehehrlich requested changes to this revision.
jakehehrlich added a comment.
This revision now requires changes to proceed.

I want to keep the public interface of Object as small as possible but other than that LGTM



================
Comment at: tools/llvm-objcopy/Object.cpp:1085
 
+void Object::renameSections(const StringMap<StringRef> &SectionsToRename) {
+  for (const SecPtr &Sec : Sections) {
----------------
This should be done where the option is handled, not by adding a method.


================
Comment at: tools/llvm-objcopy/Object.h:705
 
+  void renameSections(const StringMap<StringRef> &SectionsToRename);
   void removeSections(std::function<bool(const SectionBase &)> ToRemove);
----------------
We don't need a rename section function because you can already loop over sections and update them.


Repository:
  rL LLVM

https://reviews.llvm.org/D49576





More information about the llvm-commits mailing list