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: questions about overlay support in GNU ld


>
> > I am trying to fit potentially very big programs into a very limited local
> > storage. So we need to something like overlaying. I know GNU ld supports
> > overlaying, but does it support function calls between overlays, by any
> > means? We cannot limit our program partitioning too much so we have to
> > support calls between overlays. If GNU ld currently doesn't support that,
> > could someboy give me some pointers on how to implement it? Like related
> > code pieces in GNU ld I should study etc.?
>
> The linker doesn't support function calls between overlays directly.
> That would be pretty system dependent.  The usual approach is to use
> function stubs in the non-overlayed code which are responsible for
> loading the correct overlay and calling the appropriate function.
> Then of course you have to handle function return correctly.  The
> linker will help a little bit, with OVERLAY and NOCROSSREFS, but it
> won't do the work for you.
>
> Ian
>

Hi, Ian

I did some experiments on x86 these days and got some idea on how to
implement the stubs etc. My problem now is that I want to build a memory
image of the big program to be overlayed in some external memory so that
the local storage limited processor can fetch what it needs from the
external memory conveniently. The program to be overlayed is an elf
binary. Could anybody give me some suggestions on how to do that?

Thanks a lot!

Tao


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