This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA/RFC: Enable both gold and ld in a single toolchain


Vladimir Simonov <sv@sw.ru> writes:

> As I understand gcc checks linker properties in configure scripts
> to adjust code-generation. You are suggesting to build a toolchain
> with 2 linkers(bfd/gold). So question, which linker will be used
> in gcc configure? What if another linker has other properties?
> In the last case generated code will not correspond used linker.
>
> Simple grep of crosstools build log shows the following:
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking if the linker
> (/home/sv/work/build_root/x86_64-gcc-4.4.3-glibc-2.3.2-0.43/build/build-gcc/./gcc/collect-ld
> -m elf_x86_64) is GNU ld... yes
> checking linker --as-needed support... yes
> checking linker -Bstatic/-Bdynamic option... yes
> checking linker EH-compatible garbage collection of sections... yes
> checking linker for .hidden support... yes
> checking linker position independent executable support... yes
> checking linker PT_GNU_EH_FRAME support... yes
> checking linker read-only and read-write section mixing... read-write
> checking linker --sysroot support... yes
>
> Are gold and bfd linkers similar in above aspects?
> It was very simple grep, what if other linker properties
> affects gcc code?

It's not a stupid question.  At the moment current versions of both
gold and GNU ld satisfy all the things which the gcc configure script
tests.  However, clearly in the future this could change.  I guess
that full correctness would require testing the features of both gold
and GNU ld if support for both is requested at configure time.  The
gcc configure script would then record that a feature was supported
only if both linkers supported it.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]