[PATCH] D57738: [llvm-objcopy] Add --redefine-syms

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 02:03:00 PST 2019


jhenderson added a comment.

One question from me: is it possible using GNU objcopy to redefine to/from a name with a space in it this way? Perhaps using quotes or backslashes? Given that spaces in names are likely rare, I think it might be okay to not handle that case, but if GNU objcopy handles it, then we should too.

I think it's probably fine to deviate from GNU in the behaviour of handling lines without pairs in them, assuming that the above is handled in some sensible manner. I'd emit an error in that case.

You need a test for the case where multiple files are specified. Also possibly the case where the same symbol is mentioned multiple times in a file (although this is probably covered enough by the existing tests).



================
Comment at: tools/llvm-objcopy/ObjcopyOpts.td:83
+         "--redefine-sym=<old>=<new> is set for each one. <filename> "
+         "contains two symbol per line separated with whitespace and may "
+         "contain comments beginning with '#'. Leading and trailing "
----------------
Nit: symbol -> symbols


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

https://reviews.llvm.org/D57738





More information about the llvm-commits mailing list