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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 10:58:04 PDT 2021


MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.

`__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 correctness.
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.


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