[swift-dev] [RFC] Moving to gold linker
dccitaliano at gmail.com
Thu Jan 14 12:39:07 CST 2016
On Thu, Jan 14, 2016 at 9:54 AM, William Dillon via swift-dev
<swift-dev at swift.org> wrote:
> Hi All,
> Orlando (included in the to line) and I have been looking at using the gold linker in the swift toolchain. Orlando is really the lead on this project, I’m mostly just doing the plumbing.
> The open questions I have are the following:
> 1. Is moving to or supporting Gold within the swift toolchain (not building swift itself) a goal, non-goal, or not desired?
I can't speak for the project, but I can speak for myself.
My naive understanding is that swift uses two linkers because 'INSERT
AFTER' linker script directive isn't supported (in gold). I read a lot about
that -- and I felt like the gold developers didn't care about adding
this command as it's mainly of use for the default linker script
shipped with ld.bfd.
They also provided an alternative way to obtain the same semantics
without providing an additional directive. Other than that, I don't
know any other reasons why gold shouldn't be used.
> 2. Should the swift toolchain support the selection of linkers on the command line, and if so, what’s the default?
If you mean something like -fuse-ld for clang, I'd like to see that
happen (if not supported already). As lld developer I found that very
useful and I hope to be able to link swift and swiftc-generated
executables using lld, so, yes.
> 3. If a command-line switch for swift is not desired, should a switch in the build process select the supported linker?
> 4. Can it be assumed that gold will exist in user installations?
> For some additional context, we’re investigating the use of gold because on armv6/v7 and aarch64 platforms the standard linker has bugs that require the "big hammer,” as Dmitri called it, of -Bsymbolic to work around them. It would be nice to solve these issues a better way.
> Thoughts, Ideas, Flames, etc?
> - Will
> swift-dev mailing list
> swift-dev at swift.org
More information about the swift-dev