You'll need to run /stand/sysinstall and install the source packages to get that. BUT, "ld" is the linker, so depending on how it's designed, it might not self-build. You might want to look for a binary package in sysinstall, or put up a post asking a friendly person to send you the binary in question.
5.1 is old enough that the sources probably aren't available on most mirror sites. You might be able to use 'ld' from 5.2, but who knows. At this point you might be best off building a new 5.4 system, and mounting the old drive as secondary, then moving your data onto it. It'll be tough to get a clean upgrade without a 'ld' binary.
CVSup would get you sources, but they would be 5.4.
OK, I meant 5.3 - 5.4 isn't out yet, but it's due in 12 days. My brain is in a time warp.