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: ld input file and INPUT command - file location problem


On Tue, Oct 28, 2003 at 12:52:34AM +1030, Alan Modra wrote:
> 
> On Sun, Oct 26, 2003 at 12:39:23PM +0200, Galit Heller wrote:
> > SECTIONS {
> >
> >         .text : { library.a(.text) }
> > }
> >
> > then ld returns
> > "cannot open library.a": No such file or directory".
> 
> >From memory, I don't think that it's possible to specify an archive file
> as an input section spec.  The linker expects object file names here
> (which might be matched by object files withing an archive).

The current behavior is that ld accepts and correctly processes archive files
in the input section spec., as long as the archive exists in the current
directory - even if the archive is not explicitly mentioned in the command
line or an INPUT command.

However, if the archive is in a directory in the search path which is not the
current directory, then an error is reported. This seems to be an
inconsistency. I agree it's not a vital feature, but it appears to be
useful for embedded systems.

BTW, an object file that is an archive member is not accepted in the input
spec., even when the archive containing this object is in the current
directory.

Regards,
Galit.


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