A89: Re: ANN: mlink: braindead linker emulation


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

A89: Re: ANN: mlink: braindead linker emulation




Hi!

> I have an idea to make it possible to run very large programs (>64K).
> It involves splitting the code and the data parts into multiple 
> calculator "files."  mlink would insert a "small" piece of startup
> code that locates and relocates the individual parts before the main
> program runs. Any ideas/comments?

Don't forget about HW2 protections!!!

> Is it ok to allocate BSS from the stack if the BSS is small enough 
> (say, less than 4K)?

This should be an option.

> This is much simpler than using HeapAlloc() and friends and the 
> startup/cleanup code would be smaller. Should be BSS be zeroed?

Maybe not. The good program should not depend of an initial value
of uninitialized data. But wait. ANSI standard says: "An initial
value of an uninitialized variable is undefined for auto variables,
and zero for static, global and external variables). So, the BSS
should be zeroed, but I think that it can be an option.

> Does anyone need support for static libraries?

Yes. Read further.

> Personally I do not because I simply include lots of object files
> on the command line. link will ignore the ones that turn out to be
> unreachable.

But, good static library (I planed such one) may contain several
hundred of object files. For example, I will rewrote all hexarrays
constructors to become object files.

Cheers,

Zeljko Juric