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 scripting: locating overlays after main code


"Ian Montgomerie" <imontgom@lsil.com> writes:

> I hit a big roadblock.  To put all objects other than ovl1 and ovl2 in a
> certain place, I need to create a section using wildcards.  But the moment I
> put a section with wildcards, it grabs EVERY file and I can't reference any
> other objects later in the linker script.

Yeah, it's a problem.  If you could put the OVERLAY first in the
linker script it would probably work, but you probably don't want to
do that because then you won't be able to easily set the output
section address.

You could use incredibly hackish workarounds, like
    [A-Z0-9a-n]*(.text)
    o[a-u]*(.text)
    o[w-z]*(.text)
    [p-z]*(.text)
    etc.

It gets pretty grim pretty quickly, though.  I don't know of a good
solution to this.  Probably when the linker assigns input sections to
output sections it should do some sort of sort on file names, so that
they get associated with the most specific reference.  Currently,
though, it just goes through the linker script in order and uses the
first match, as indeed is documented.

Ian


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