[PATCH] D104164: Remove __llvm_mipmap section in llvm-strip

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 19:22:22 PDT 2021


ellis added a comment.

In D104164#2815798 <https://reviews.llvm.org/D104164#2815798>, @MaskRay wrote:

> `__llvm_mipmap` is not a debug section, so not suitable in `isDebugSection`.
>
> `--strip-debug`/`--strip-nonalloc`/`--strip-all-gnu` cannot remove SHF_ALLOC sections. The proposed `__llvm_mipmap` has the SHF_ALLOC flag so not suitable.
>
> Every SHF_ALLOC section is part of the program image. A tool like llvm-strip needs to be conservative and assumes removal of every such section can affect runtime behaviors and probably correctness.
> (A self-introspection program can dump its own non-SHF_ALLOC section; this sentence does not discuss such programs.)
> Sometimes there are indeed special SHF_ALLOC sections which are strippable, users can remove them with `--remove-section`. It is not strip's business to understand every such section.

I have no problem using `--remove-section` so I'll update this stack to use that. Thanks for the feedback!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104164



More information about the llvm-commits mailing list