forked from KolibriOS/kolibrios
fix zero BSS segments
git-svn-id: svn://kolibrios.org@6858 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4e23975970
commit
80c223b078
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user