Is it really the job of the linker to choose between different implementations of a function?
Yes. Why do you ask?
It seems to me that this might lead to very, very difficult to track down bugs....
Nope. All those bugs are trivial to track down, as once you find the translation unit that contained the compiled code with something called a debugger, you submit the -E for it and that flags used to compile it, and because the compiler is deterministic, all such bugs are trivial to track down.