Apple ld64 implements -why_live sym > Logs a chain of references to symbol_name. Only applicable with -dead_strip . It can help debug why something that you think should be dead strip removed is not removed. I have some notes at https://maskray.me/blog/2022-02-27-analysis-and-introspection-options-in-linkers The feature has been ported to LLVM linker's Mach-O port (https://reviews.llvm.org/D120377) and the ELF port feature is being worked on (https://github.com/llvm/llvm-project/pull/127112). Would be nice to have a similar feature in GNU ld.
Seems badly named option. why_referenced seems like a better name.