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


On 03/16/2010 08:49 PM, Nick Clifton wrote:
Hi H.J.

Is that possible to pass -fuse-ld=XXX directly to collect2

Sure, but ...


so that you don't need to change exec-tool.in?

exec-tool will still need to be updated. It is still invoked (as "collect-ld") and it still needs to be able to understand the -use-gold/-use-ld options.

Cheers
Nick





Hi all,


One, may be stupid, question.

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?

Thanks in advance
Vladimir Simonov


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