[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] C++ Stuff
Miro Kropacek wrote:
I meant the opposite -- how it's possible even the ancient AtariST
compilers (PureC, LatticeC, ... -- all used DRI/GST format I believe)
discard unused stuff because it seems only natural thing to do
Pure C and co were commercial products, the GST (or whatever else)
object file format may have included such a feature since the beginning.
That was good software !
> and gcc/ld (from the beginning?) didn't care about it?
> It seemed strange to nobody?
I don't know the full history, but on older unixes, gcc had to be
compatible with the native linker, then gnu ld had to be binary
compatible with the native linker too to avoid incompatibilities, etc.
So about function removing, if that feature was unavailable with
original tools, it might explain why it was not present in gcc in early
stages.
Another reason is that all unixes used shared libraries, so the libc was
never embedded into executables, and it was loaded only one time in
system memory. With this feature, the size of the executables is always
minimal.
> Or there was another (with the ability to discard unused stuff)
object format mint community didn't choose to use?
Yes, there is another format: COFF
http://en.wikipedia.org/wiki/COFF
But I'm not 100% sure it allows discarding unused code.
Regarding file formats, unixes have used a.out, then COFF, then ELF.
So our MiNT stuff is totally outdated.
Switching to ELF *object* file format is the first step to do toward the
modernity.
Implementing Virtual Memory inside the FreeMiNT kernel would be another
great step.
As far as I know, these two steps are totally unrelated (but mandatory
for the next steps).
--
Vincent Rivière