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: linker file/section matching rules when using libraries


Hi,

> You can't pick a file out of an archive in a linker script.

Ok - no problem... just wishful thinking :-)

> If you name an archive, the mapping will be applied to every object in
> the archive.  At least, that is how it is supposed to work.

I ran some more tests...

I have just discovered that it works if I give the path (absolute or
relative) but it can't find it using the -L search paths.

The libraries all link ok normally with the search path.

Is this a bug?

This is one part of the linker I haven't looked at.

Nick

----- Original Message ----- 
From: "Ian Lance Taylor" <ian@wasabisystems.com>
To: "Nick Kelsey" <fsf@silicondust.com>
Cc: <binutils@sources.redhat.com>
Sent: Wednesday, February 04, 2004 12:06 PM
Subject: Re: linker file/section matching rules when using libraries


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> "Nick Kelsey" <fsf@silicondust.com> writes:
>
> > In the linker script, when writing section matching rules they follow
the
> > following form:
> >
> > <filename> (<section name>)
> >
> > For example:
> > * (.text)
> > * (.text.*)
> >
> > The filename works if you specify the name of a .o file and either pass
it
> > on the command line or the .o file is available in the linker .o search
> > path.
> >
> > The problem is that our build process puts everything into lib files
(.a)
> > and the .o files are not available to the linker.
> >
> > How do you specify either a lib file to match or ideally a file within a
lib
> > file (if that is possible)?
>
> You can't pick a file out of an archive in a linker script.
>
> If you name an archive, the mapping will be applied to every object in
> the archive.  At least, that is how it is supposed to work.
>
> Ian
>
>


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