mold
mold copied to clipboard
elf: Support --warn-backrefs
The GNU ld/gold semantics may feel weird for people coming from VMS, Mach-O ld64, Windows link.exe world, but it does have a nice property: https://maskray.me/blog/2021-06-13-dependency-related-linker-options#warn-backrefs
I believe it can be implemented as an extra pass in which we simultaneously visit all symbols of all object files to see if there's an undefined symbol that back-refers other object file. It's not high priority, but it's nice to have.