[PATCH] D46029: [llvm-objcopy] Implement --redefine-sym option

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 15:40:29 PDT 2018


jakehehrlich added inline comments.


================
Comment at: tools/llvm-objcopy/Opts.td:30
                       HelpText<"Remove <section>">;
+def redefine_symbol : Separate<["--"], "redefine-sym">,
+                       MetaVarName<"old=new">,
----------------
Can you use Eq here instead of Separate?


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:392
+        InputArgs.getLastArgValue(OBJCOPY_redefine_symbol).split('=');
+    if (Config.Old2New.first.empty() || Config.Old2New.second.empty())
+      error("Bad format for --redefine-sym");
----------------
Why is it a problem to have an empty symbol name? I don't think the spec says anything against that.


Repository:
  rL LLVM

https://reviews.llvm.org/D46029





More information about the llvm-commits mailing list