[uCsimm] Re: [UCLINUX] Fw: 32-bit PIC patches for the uCsimm !

From: Vadim Lebedev (vlebedev@aplio.fr)
Date: Thu Jan 06 2000 - 14:34:53 EST


But how do you reseve a fixed memory location for this library?

I think that implementing shared library functionality similar to ELF shared
libraries is more promising approach....
Vadim

----- Original Message -----
From: Erwin Authried <eauth@softsys.co.at>
To: <ucsimm@uclinux.com>; 'Vadim Lebedev' <vlebedev@aplio.fr>
Cc: <uclinux@c3po.kc-inc.net>
Sent: Thursday, January 06, 2000 7:14 PM
Subject: Re: [UCLINUX] Fw: 32-bit PIC patches for the uCsimm !

> You are right, Vadim, the data offsets must be the same.
> You will have to make sure that the linker puts the
> library data segment before the application's data.
> And you have to link against ALL library files, instead
> of the objects needed by each application.
> The only disadvantage that I can see now is the fact
> that each application reserves data+bss for the full library.
> This way, the library text segment should be equivalent for
> all applications, right?
>
> Regards,
>
> Erwin
>
> RAM:
> .data libc/app1 (starting at offset 0)
> .data app1
>
> .data libc/app2 (starting at offset 0)
> .data app2
>
> FLASH:
> .text app1
> .text app2
>
> .text libc (common for all app's)
>
> Vadim Lebedev[SMTP:vlebedev@aplio.fr] wrote:
> >
> > Ok,
> >
> > I'll try to explain:
> > suupose you have library rootine foo(), which updates global
variable
> > errno, with the code like this:
> >
> > foo()
> > {
> > errno = 5;
> > }
> >
> > it will be compiled to simething like:
> >
> > foo:
> > mov d1,5
> > mov errno(a5), d1
> > ret
> >
> > Now, when you link this library to the aplllication A, errno offset from
the
> > beginnig of data segment will be let's say 0x100
> > and when you link the library to application B the offset could be
0x200...
> > In any case the actual contents of the libaray .text
> > segment is different, hence you can't do code sharing.....
> >
> > Regards
> > Vadim
>

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:33 EST