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: Need help on OVERLAY command in linker script...


Tao Zhang <zhangtao@cc.gatech.edu> writes:

> I modified the standard linker script a little bit:
> 
> [skip...]
> .text    :
> {
>     foo1.o(.text) foo2.o(.text)
> }
> OVERLAY  :
> {
>     .ovly0 { ovly0.o(.text) }
>     .ovly1 { ovly1.o(.text) }
>     .ovly2 { ovly2.o(.text) }
> }
> .text    :
> {
>     *(.text)
> }

Presumably these appear inside a SECTIONS construct.

I'm not sure that it makes sense to use OVERLAY without using either
AT to specify the LMA or > to specify a memory region.

It's very odd to specify .text more than once.  I think that will
create two different .text sections.  Do you want the overlay space to
be within the .text section?  Why?

> The result is that the binary doesn't contain .ovly0, .ovly1 and .ovly2
> sections at all, it looks the overlay command is simply ignored.

That is hard to understand.  Generate a linker map using the -M option
to see what happened to those sections.

Ian


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