sbc100 wrote: The ELF linker already handles clearing all the stuff. I think the fix is straight forward, but writing tests is the tricky part.. I'll see how this is tested in ELF and try to replicate. https://github.com/llvm/llvm-project/pull/78640