agn453/HI-TECH-Z80-C

LIBC library object modules need re-ordering

agn453 opened this issue · 1 comments

Just flagging an issue with the ordering of object module dependencies in LIBC.LIB (and LIB280C.LIB). Linking a program is creating an executable that includes unreferenced functions - and therefore the .com file is larger than it needs to be.

I've re-ordered the LIBC.LIB and LIB280C.LIB libraries to prevent some undefined symbol errors when linking.

To resolve the large executable proved more difficult since the enhanced _getargs() feature was causing many large library modules (like printf() doprnt() and the stdin, stdout and stderr file I/O routines) to be included in the CP/M binary executable.

I've therefore implemented a new -N option to the compiler front-end. This will select a new start-up module from
NRTCPM.OBJ that has a minimal and compact version of _getargs().

This is implemented in the new release V3.09-12 at commit ID 1361b75