Hacker News new | ask | show | jobs
by Someone 2474 days ago
I don’t know how advanced the go linker is, but the distinction between compiler and linker gets blurred when one adds link-time optimization (https://llvm.org/docs/LinkTimeOptimization.html, https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html, https://en.m.wikipedia.org/wiki/Interprocedural_optimization)

Even if it doesn’t do that, fixing up various addresses can be a lot of work if the linker can make code shorter (e.g. by using short branches where possible), or if it tries to increase cache locality by changing function order.