1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00
cc65/libsrc/common
Oliver Schmidt 3d08abcfa8 Load INITBSS segment from disk.
Conceptually the INITBSS segment is not initialized in any way. Therefore it makes sense to not load it from disk. However the INIT segment has to be loaded from disk and therefore moved to its run location above the INITBSS segment. The necessary move routine increases runtime RAM usage :-(

Therefore we now "unnecessarily" load the INITBSS segment from disk too meaning that the INIT segment is loaded at its run location. Therefore there's no need for the move routine anymore.

After all we trade disk space for (runtime) RAM space - an easy decision ;-)

Notes:

- The code allowing to re-run a program without re-load present so far could not have worked as far as I can see as it only avoided to re-run the move routine but still tried to re-run the code in the INIT segment that was clobbered by zeroing the BSS. Therefore I removed the code in question altogether. I'm personally not into this "dirty re-run" but if someone wants to add an actually working solution I won't block that.

- INITBSS is intentionally not just merged with the DATA segment as ROM-based targets can't reuse the INIT segment for the BSS and therefore have no reason to place the INIT segment above INITBSS.

- Because ROM-based targets don't copy INITBSS from the ROM (like it is done with the DATA segment) all users of INITBSS _MUST_NOT_ presume INITBSS to be initialized with zeros!
2016-02-28 19:45:36 +01:00
..
_afailed.c Made _afailed() and uncompress() be fastcall functions. 2015-03-13 07:35:47 -04:00
_cwd.s Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00
_directerrno.s Moved two errno helper functions into separate files. 2015-09-25 14:06:58 -04:00
_environ.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_fdesc.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_file.h Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
_file.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_fopen.s
_heap.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_heapadd.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_heapblocksize.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_heapmaxavail.s Have _heapmaxavail() work as advertised. 2014-02-20 21:04:11 +01:00
_heapmemavail.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_hextab.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
_longminstr.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
_mappederrno.s Moved two errno helper functions into separate files. 2015-09-25 14:06:58 -04:00
_oserror.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_poserror.c Fixed comments. No code change. 2011-04-25 18:49:24 +00:00
_printf.h Added explicit settings of calling conventions in pointer-to-function declarations in system and library headers. 2015-06-22 00:15:48 -04:00
_printf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_scanf.c Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
_scanf.h Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
_scanf.inc
_seterrno.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_swap.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
_sys.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
abort.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
abs.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
asctime.c
atexit.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
atoi.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
bsearch.c Added explicit settings of calling conventions in pointer-to-function declarations in system and library headers. 2015-06-22 00:15:48 -04:00
calloc.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cc65_idiv32by16r16.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cc65_imul8x8r16.s Added a fast subroutine to multiply two signed 8-bit numbers. 2014-05-11 01:08:27 -04:00
cc65_imul16x16r32.s Working on the division and multiplication routines. 2009-11-04 19:41:54 +00:00
cc65_sincos.s Fixed the return types of the sine/cosine functions. Added comments. 2009-10-30 14:02:24 +00:00
cc65_udiv32by16r16.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cc65_umul8x8r16.s Fixed the comments to say where the actual Left-Hand Side and Right-Hand Side are put. 2014-05-11 10:43:06 -04:00
cc65_umul16x8r32.s Make the 8x32 unsigned multiplication routine C callable. 2011-07-10 14:52:35 +00:00
cc65_umul16x16r32.s Working on the division and multiplication routines. 2009-11-04 19:41:54 +00:00
chdir.s Renamed oserrcheck to __mappederrno. Added an additional function named 2010-06-10 18:10:53 +00:00
copydata.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
creat.s
ctime.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
divt.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
errno.s Moved two errno helper functions into separate files. 2015-09-25 14:06:58 -04:00
errormsg.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fclose.s
fdopen.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fgetc.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fgetpos.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fgets.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fmisc.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
fopen.s
fprintf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
fputc.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fputs.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fread.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
free.s Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
freopen.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fscanf.s Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fseek.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fsetpos.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
ftell.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
fwrite.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
getchar.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
getcpu.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
getcwd.s Call __seterrno and save a few bytes. 2010-06-03 21:29:28 +00:00
getenv.s
getopt.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
gets.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
gmtime.c
interrupt.s Fixed bugs in the interface for C-level interrupt handlers. 2015-08-26 19:33:34 -04:00
isalnum.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isalpha.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isblank.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
iscntrl.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isdigit.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isgraph.s Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
islower.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isprint.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
ispunct.s Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
isspace.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isupper.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
isxdigit.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
itoa.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
labs.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
locale.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
localtime.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
longjmp.s Improved longjmp() and setjmp(). 2015-09-11 14:18:22 -04:00
ltoa.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
malloc.s Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
memchr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
memcmp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
memcpy.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
memmove.s Added pce-specific substitutes for memcpy() and memmove(). 2015-10-23 18:02:21 -04:00
memset.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mkdir.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mktime.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
modfree.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
modload.s Use the new declarations from the zeropage include file. In interrupt handlers 2012-11-04 15:23:05 +00:00
perror.c Use _errno, not errno. 2010-06-03 21:31:06 +00:00
pmemalign.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
printf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
putchar.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
putenv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
puts.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
qsort.c Added explicit settings of calling conventions in pointer-to-function declarations in system and library headers. 2015-06-22 00:15:48 -04:00
raise.s
rand.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
realloc.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
remove.s Renamed oserrcheck to __mappederrno. Added an additional function named 2010-06-10 18:10:53 +00:00
rename.s Renamed oserrcheck to __mappederrno. Added an additional function named 2010-06-10 18:10:53 +00:00
rewind.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
rmdir.s Renamed oserrcheck to __mappederrno. Added an additional function named 2010-06-10 18:10:53 +00:00
scanf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
searchenv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
setjmp.s Improved longjmp() and setjmp(). 2015-09-11 14:18:22 -04:00
signal.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sigtable.s
sleep.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
snprintf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sprintf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sscanf.s Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
strcat.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strchr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strcmp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strcoll.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strcpy.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strcspn.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strdup.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strerror.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strftime.c Have %I yield values [1..12] instead of [0..11]. 2013-12-09 19:53:54 +01:00
stricmp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strlen.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strlower.s Fixed some return pointers. 2013-08-28 02:58:41 -04:00
strncat.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strncmp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strncpy.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strnicmp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
stroserr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strpbrk.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strqtok.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
strrchr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strspn.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strstr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strtoimax.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strtok.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
strtol.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
strtoul.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
strtoumax.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
strupper.s Fixed some return pointers. 2013-08-28 02:58:41 -04:00
strxfrm.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
system.c Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
time.s fixed timep handling in time() 2013-10-02 20:55:01 +01:00
timezone.c
tolower.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
toupper.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
uname.s Renamed oserrcheck to __mappederrno. Added an additional function named 2010-06-10 18:10:53 +00:00
ungetc.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
unlink.s
utscopy.s
vfprintf.s Added explicit settings of calling conventions in pointer-to-function declarations in system and library headers. 2015-06-22 00:15:48 -04:00
vfscanf.s Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
vprintf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
vscanf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
vsnprintf.s Fixed a hardware-stack leak. 2015-07-17 20:36:56 -04:00
vsprintf.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
vsscanf.s Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
zerobss.s Changed run location of INIT segment. 2015-10-14 22:52:09 +02:00