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: [Gold] Can't we specify input files & libraries in linker scripts ?


Thanks, cary, It's ok to put the input files & libraries on the command line, but it's inconvenient to the end user, such as :
ld.gold crt0 -lm -lc -lgloss_mspu -lcompiler_rt inputfile.o

If we can specify the default files & libraries(such as crt0, -lc, -lgloss_mspu -lcompiler_rt) in a linker script, say script.ld, it will be more concise:
ld.gold -T script.ld inputfile.o

-Shawn

On 2013å08æ13æ 05:24, Cary Coutant wrote:
It's ok to specify the input files & libraries in the command line,But  if
we add default libraries to be linked in linker script with the "GROUP"
clause, "internal error" occurs.  This "internal error" occurs because of
the  assertion in binutlis-2.23.2/gold/script.cc:1600 ,which says :

gold_assert(!closure.saw_inputs());

Does it means we can't specify any input files & libraries in linker script
?
You can specify input files and libraries in a script that you put on
the command line as an ordinary input file (i.e., with no
-T/--script/--version-script option). If you see this error, it's
probably because you used -T/--script.

It's a bug, though, that you see an internal error instead of a
reasonable error message explaining what was wrong.

-cary



--
============================
äåçåéèååççæãèåæ
çèïã010-62620080-777



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