https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52982
Eric Gallager <egall at gwmail dot gwu.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egall at gwmail dot gwu.edu --- Comment #2 from Eric Gallager <egall at gwmail dot gwu.edu> --- While this report seems to be just talking about switching between ld.bfd and gold, I'd appreciate it if the linker switching could be done more generically, to support more linkers besides just those two. For example, on my current system (darwin), my copy of gcc is configured to use the ld64 installed by my package manager by default. Besides this linker, I also have several other linkers to choose between: * the system ld64, which is an older version than the default ld64 installed by my package manager * several other versions of ld64, each with a version suffix appended to the name of its binary (i.e. "ld-97", "ld-127", "ld-136", and "ld-latest") * the old cctools ld, installed as "ld_classic" * the GNU binutils/bfd ld, installed with binaries prefixed with the letter "g" (so "gld" and "gld.bfd") My case is probably a little extreme, as I doubt the average user will have this many linkers installed, but it still serves as an example of the variety of linkers that exist out there. Oh, and also, while I'm here, I figure I might as well add a personal example of a practical effect that this issue can have: today, I was running into an error codesigning the copy of gdb that I just built, because the linker that my copy of gcc used generated load commands that were newer than what my system codesigning utilities understood. I tried wrangling the codesigning stuff in a few different ways, but it would have been easier if I could have just told gcc to use the system linker instead of the one it had been configured with...