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

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 19:42:43 PDT 2018


alexshap added a comment.

@jakehehrlich 
if i'm not mistaken it could be done differently, in particular, without introducing these subtle dependencies on the order of destruction of different section types.
In fact, if i'm not mistaken it's not really necessary to introduce that logic into the destructors at all.
Would the following approach work :  simply calculate the values of Symbol.UseCount after the removal of sections (it would be one loop over all the relocations and group sections) ?


Repository:
  rL LLVM

https://reviews.llvm.org/D46896





More information about the llvm-commits mailing list