A89: ANN: mlink: braindead linker emulation
[Prev][Next][Index][Thread]
A89: ANN: mlink: braindead linker emulation
Hi!
mlink v2.12-beta is available at http://alh.dhs.org/ti89/
IMPORTANT NEW FEATURES:
* maximum program size is now really ~64K (~4GB in theory), not ~32K
* custom relocation system results in smaller programs
* "braindead linker emulation" options for linking TI-GCC nostub programs
IMPORTANT OLD FEATURES:
* full support for uninitialized data (weak publics)
* resolves 16-bit relative relocations at link time
* removes unused sections to minimize program size
* entry point anywhere in program for all program types (kernel/nostub/...)
I need a method to do relative (forward) jumps (and subroutine calls) across
distances that are >32K (but <64K). Is it possible to do this in less than
eight bytes? (Register(s) destroyed is ok.)
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?
Is it ok to allocate BSS from the stack if the BSS is small enough (say,
less than 4K)? This is much simpler than using HeapAlloc() and friends and
the startup/cleanup code would be smaller. Should be BSS be zeroed? The
BSS in current nostub programs is not zeroed because it's treated as DATA.
(Well, nobody uses BSS nowadays because of the "bug" in a certain linker...)
Does anyone need support for static libraries? Personally I do not because
I simply include lots of object files on the command line. mlink will
ignore the ones that turn out to be unreachable.
--
Johan "Knowledge is an illusion without answers."