This is the mail archive of the
mailing list for the GCC project.
Re: Specifying command line arguments in a file?
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Specifying command line arguments in a file?
- From: Robert Schweikert <rjschwei at hks dot com>
- Date: Tue, 01 May 2001 09:07:09 -0400
- Cc: dewar at gnat dot com, geoffk at geoffk dot org, gcc at gcc dot gnu dot org,rjschwei at hks dot com
- Organization: Hibbit, Karlsson & Sorensen
- References: <20010501045019.82FABF289F@nile.gnat.com> <20010430235408.C21613@lucon.org>
"H . J . Lu" wrote:
> On Tue, May 01, 2001 at 12:50:19AM -0400, email@example.com wrote:
> > Note that several linkers do have this kind of capability (to read lists
> > of objects from a file). This capability is available on both DEC Unix
> > (Tru64) and IRIX. It seems a useful feature for any linker.
> > Sure you can put objects in a .a library but that is often not convenient
> > when you are building big systems. You can still reach command line length
> > limits even after breaking things down into subsystems.
> You can put a list of objects in a file with th GNU ld. Under Linux,
> # cat /usr/lib/libc.so
> /* GNU ld script
> Use the shared library, but some functions are only in
> the static library, so try that secondarily. */
> GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
Will this work without providing a complete linker script, i.e. without using
SECTION in the linker script?
If this is the case I am wondering why my linker script that has only
EXTERN statement in it does not work.
For example if I have the following script.
and provide the script name on the command line for linking a shared library on
Linux I do get a runtime failure when the library is loaded with the message
that "uexternaldb_" is undefined. However, when I link the same object and
archive code but use -u uexternaldb_ -u .... the shared library works just
This indicates to me that either the script mechanism is broken in ld or I am
not allowed to create a linker script that does not supply memory layout
information. Or is there a special trick that I am over looking in your
Robert Schweikert MAY THE SOURCE BE WITH YOU