This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFA: Adding feature for putting system libraries for pe-coff targets as last in link order
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 14 Sep 2009 09:53:10 +0100
- Subject: Re: RFA: Adding feature for putting system libraries for pe-coff targets as last in link order
- References: <90baa01f0909140039y44143ff6md7ddddf8a1e968b8@mail.gmail.com>
Kai Tietz wrote:
> Hello,
>
> it is a pretty common issue, that symbols in system libraries are
> possibly replacing own runtime functions, when users are specifying
> additional system libraries by -l option to ld. AFAIK there is at the
> moment no way to say, that a specific library should be imported at
> tail of chain, and not at possition specified.
Can you give us an example to demonstrate why the solution to the problem
isn't just to tell people "write the libraries in the order you want, rather
than in the wrong order that you don't want, on the command line"?
> Therefore I would like to ask, if there is interest in an extension to
> linker for this. I would suggest for this an linker option -sys-l, or
> -tail-l.
I'm not sure whether this should really be considered a problem with the
linker, rather than a problem with the GCC driver or wherever the flags are
coming from. I can't think of a situation where I've ever needed this sort of
option and wished it existed, so I'll reserve judgment until I see what kind
of example usage you're envisaging.
cheers,
DaveK