MaskRay wrote: I think we need a different approach to implement symbol demoting. I re-implemented the stuff in https://github.com/maskray/llvm-project/tree/lld-symbols-in-discard and added you as a co-author :) https://github.com/llvm/llvm-project/pull/68777