diff --git a/programs/develop/ktcc/trunk/source/Makefile.kos32 b/programs/develop/ktcc/trunk/source/Makefile.kos32 index 02bfcd62bb..d6bab2577b 100644 --- a/programs/develop/ktcc/trunk/source/Makefile.kos32 +++ b/programs/develop/ktcc/trunk/source/Makefile.kos32 @@ -1,7 +1,7 @@ CC = kos32-gcc LD = kos32-ld -SDK_DIR:= $(abspath ../../../sdk) +SDK_DIR:= $(abspath ../../../contrib/sdk) #gcc 4.8 #LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/static.lds diff --git a/programs/develop/ktcc/trunk/source/tccmeos.c b/programs/develop/ktcc/trunk/source/tccmeos.c index e8d38c68ce..f431955a0a 100644 --- a/programs/develop/ktcc/trunk/source/tccmeos.c +++ b/programs/develop/ktcc/trunk/source/tccmeos.c @@ -274,7 +274,14 @@ int tcc_output_me(TCCState* s1,const char *filename) for (si=me.data_sections;si;si=si->next) fwrite(si->data,1,si->data_size,f); for (si=me.bss_sections;si;si=si->next) - fwrite(si->data,1,si->data_size,f); + { + if (si->data == NULL) + { +// printf("\nError! BSS data is NULL! size:%i",(int)si->data_size); + si->data = calloc(si->data_size, 1); + } + fwrite(si->data, 1, si->data_size, f); + } /* if (me.bss_sections) // Siemargl testin, what we lose {