[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Missing .so libs 'solution'?



Hello!

> > > > IIRC ELF architecture uses some fixed adresses (program is loaded at fixed
> > > > address).
> > >
> > > This is something really easy to fix based on this pure description IMO.
> > > ;)
> >
> > I'm interesting to hear how do you reloacate an already reloacated ELF
> > binary to another start address.
>
> I'm not going to do that. I don't plan to share the libraries across
> multiple process's space. From this point of view the VM is just an
> optimalization of memory consumption.
>
> No further relocations beyond binary startup. The lib would be loaded
> several times into physical memory and relocated for each such case.

I don't speak about ELF libraries (that's a different and more
complicated story for sure).

I just speak about the simple case of a binary executable (without shared
libraries). ELF binaries are already relocated to an fixed (architecture
specific and constant) address. E.g. an ELF binary is not relocateable as
it's already relocated by the linker.

Shared libraries are another story. As the final address is not known on
link time they must be position independant (PIC option of the compiler to
generate position independant code). This require for sure support of the
toolchain too and a runtime linker (and a VM capable system).


Ciao
   ...Frank

--
ATARI FALCON 040 // MILAN 060
-----------------------------------------
http://www.cs.uni-magdeburg.de/~fnaumann/
e-Mail: fnaumann@freemint.de