4 ms·
Thanks for not hating me :p What i also find hard to understand is that generally linkers are "single pass" i.e. you need to feed them objects and libs in the
by nuancebydefault 4y ago
Thanks for not hating me :p
What i also find hard to understand is that generally linkers are "single pass" i.e. you need to feed them objects and libs in the correct order (callers prior to callees) for them to solve all links. Not sure if this requirement still is always there.
- JonChesterfield 4y agoThat requirement vhas been gone for decades if it ever existed, though static library semantics look a bit like that if you don't pass extra flags around them. Linkers are multiple pass if doing compiler optimisation things. Otherwise they're pretty close to cat + patch some pieces, single pass seems fair. It's not immediately obvious to me why linkers don't say which functions were making the undefined symbol call. A suspicion is that the linker may not know what the function name is for the corresponding instruction without digging it out of the debug info and the linker probably doesn't have the corresponding parser ready to hand. It probably could narrow it down to a source object file, though libraries make that difficult.
- WalterBright 4y agoI've written linkers. This one pass thing was gone before the 1980s.
- nuancebydefault 4y agoI've seen it being a problem maybe 10 years ago but i'm happy if it is fully a thing of the past.