This is the mail archive of the binutils@sources.redhat.com 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: [PATCH] Skipping of incompatible linker scripts in search path


On Thu, Oct 10, 2002 at 01:26:14PM +0930, Alan Modra wrote:
> On Thu, Oct 10, 2002 at 01:19:44AM +0200, Jakub Jelinek wrote:
> > Ie. say IA-32 /usr/lib/libc.so would contain:
> > OUTPUT_FORMAT ( elf32-i386 )
> > GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
> 
> I'd rather some other scheme, if at all possible, because it would be
> nice to build a biarch linker that automatically selected output arch
> depending on input.  There is code in ld to do that (whether it works
> or not I can't say), but it is overridden by OUTPUT_FORMAT in scripts.
> So if we got rid of all OUTPUT_FORMAT statements in scripts it might
> be possible to dipense with -m arch on ld command line.

I admit I don't understand this argument.
I'll try what prevents the automatical output selection, but my guess
it is just the builtin linker script's OUTPUT_FORMAT, not anything else.
ATM OUTPUT_FORMAT anywhere but in the -T scripts or builtin script is
simply ignored.
IMHO default_target should be changed to a triplet to handle -EB/-EL
options and OUTPUT_FORMAT removed from the builtin linker scripts.
The OUTPUT_FORMAT behaviour could be if some input files (or
linker scripts with OUTPUT_FORMAT) has been already loaded, check if
it matches and bail out if it does not (with skipping when searching),
or set the current output format as if it was an input file.

If you prefer some other statement instead, that's certainly doable,
but we'll loose backwards compatibility (ie. if one installs glibc
2.3.2, he won't be able to use binutils < 2.14; well, it could be some
special magic in linker script comment instead and be compatible too).

	Jakub


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