This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Gold] Can't we specify input files & libraries in linker scripts ?
- From: Cary Coutant <ccoutant at google dot com>
- To: Shawn <shaolin dot xie at ia dot ac dot cn>
- Cc: Ian Lance Taylor <iant at google dot com>, Triple Yang <triple dot yang at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 12 Aug 2013 14:24:21 -0700
- Subject: Re: [Gold] Can't we specify input files & libraries in linker scripts ?
- References: <52085333 dot 4090909 at ia dot ac dot cn>
> 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