ld options file question

Ariel Burton ariel.burton@roguewave.com
Fri Aug 31 20:44:00 GMT 2012


Dear all,

ld's options file command line switch (@) is very useful.

One use-csae is that one can place a set of libraries in a
directory.  One could then put the -l directives in an option
file.  The problem I've had is what to do with the -L directive.
I've had to put it on the command line, which means that the
path to the directory holding the options file and the libraries
has to be given twice: once for the @ option, and once in the
-L directive, that is something like:

  @<dir>/options.ld -L<dir>

The -L directive could go in the options file, but then
the options file needs to be modified if the location
of the directory changes.

I would like to be able to write something like this in the
options file:

  -L$ORIGIN
  -lone
  -ltwo
  .
  .
  -lseventeen

where $ORIGIN is the directory in which the options file lives.

Is this, or something similar, possible?

Thanks,

Ariel Burton



More information about the Binutils mailing list