[PATCH] D46896: [llvm-objcopy] Add --strip-unneeded option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 08:41:58 PDT 2018


jhenderson added a comment.

I'm not sure if it makes much sense, but could this interact badly with group section signature symbols?



================
Comment at: tools/llvm-objcopy/Object.cpp:264-265
+Symbol *SymbolTableSection::getSymbolByIndex(uint32_t Index) {
+  if (Symbols.size() <= Index)
+    error("Invalid symbol index: " + Twine(Index));
+  return Symbols[Index].get();
----------------
paulsemel wrote:
> jhenderson wrote:
> > I might be inclined to make this check into a separate shared method, to avoid risk of the two diverging.
> What do you think about this ?
I'm always a bit wary of const_cast, but I think it looks okay to me.


Repository:
  rL LLVM

https://reviews.llvm.org/D46896





More information about the llvm-commits mailing list