[swift-dev] [RFC] Moving to gold linker
jgroff at apple.com
Thu Jan 14 23:19:01 CST 2016
> On Jan 14, 2016, at 11:07 AM, William Dillon via swift-dev <swift-dev at swift.org> wrote:
>>> 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.
> That’s right, AFAIK. Orlando developed a system using two assembler files that bookend the objects during link to achieve the same result as the ld script. Additionally, this method works with BFD, so swift.ld can be discarded entirely.
That sounds like a great improvement. Supporting gold for the entire build process would be great. Any idea if the assembler input would also work on FreeBSD or other platforms?
More information about the swift-dev