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

Re: [MiNT] binutils



On Mon, 2005-08-08 at 15:24 +0200, Guido Flohr wrote:
> Hi,
> 
> Howard Chu wrote:
> > If you guys are investigating new binutils and new object file formats, 
> > then now is a good time to invest in developing a re-linkable executable 
> > file format. ELF may be a good starting point; as noted already you can 
> > put whatever sections you want into an ELF file. You could try keeping 
> > the ELF .relo section and just append it to the TOS file image, with an 
> > appropriate pointer to it in the standard TOS symbol table.
> 
> I see no real benefit from changing the format of the executables.  The 
> current format provides everything you need, including the relocation 
> information.  Why change that?

Actually, I agree with Howard Chu.  He isn't talking about changing the
executable with something incompatible, nor adding something that
already exists like relocation information.  The ability to relink an
executable provides the benefits of dynamic linking without the
drawbacks such as slow load time.

> The real problem is the lack of dynamic linking facilities which has 
> nothing to do with the container format of executables.  I would rather 

No, I don't see how dynamic linking is going to help, especially without
a virtual memory space, which you admit below isn't likely to happen
soon.

> investigate in the format and logic of shared libraries.  If you agree 
> with me, that MiNT will not see "real" virtual memory management before 
> the heat death of the universe, and limit expectations to dynamic 
> linking (as opposed to sharing code sections in memory between 
> processes), I can't see why the Perl interpreter shouldn't be able to 
> dynamically load extensions.

Loading new code into a running program isn't dynamic linking, thats
run-time linking.  We have that with LDG, and adding other forms of
run-time linking (without sharing) wouldn't be that difficult since the
loading of the new code is done with a specific library call.  Dynamic
linking is linking of libs that are normally static, before the program
begins execution, and without having to call any specific libraries to
load the code.   His compromise is to link libraries statically as we do
now, but provide enough information in the executable so that it can be
relinked when you upgrade the library.

-- Evan