ld input file and INPUT command
ld input file and INPUT command - file location problem
Alan Modra amodra@bigpond.net.auMon Oct 27 14:22:00 GMT 2003
- Previous message (by thread): ld input file and INPUT command - file location problem
- Next message (by thread): ld input file and INPUT command - file location problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Oct 26, 2003 at 12:39:23PM +0200, Galit Heller wrote:
> When a library file is the argument to INPUT command, the archive library
> search path is searched, and the archive is found. However, for object
> files the search path isn't searched. E.g. if file.o resides in .., and
> -L.. is used in the command line, and the linker script has the line:
>
> INPUT(file.o)
>
> then ld returns the following error:
> "cannot open file.o": No such file or directory".
>
> This is in contrast to the ld user manual 3.4.2 INPUT command description:
>
> "The linker will first try to open the file in the current directory.
> If it is not found, the linker will search through the archive library
> search path."
>
> Is the second sentence above true only for library files ?
Yes. The treatment of files specified in INPUT statements is consistent
with the treatment of files on the command line.
> 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).
--
Alan Modra
IBM OzLabs - Linux Technology Centre
- Previous message (by thread): ld input file and INPUT command - file location problem
- Next message (by thread): ld input file and INPUT command - file location problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list