Try to beat the strange break - revert all files from the last commit.

git-svn-id: svn://kolibrios.org@8155 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2020-11-06 20:14:24 +00:00
parent 0fe740bca1
commit fa67855b83
5 changed files with 151 additions and 162 deletions

View File

@ -1,7 +1,7 @@
CC = kos32-gcc CC = kos32-gcc
LD = kos32-ld LD = kos32-ld
SDK_DIR:= $(abspath ../../../../../contrib/sdk) SDK_DIR:= $(abspath ../../../contrib/sdk)
#gcc 4.8 #gcc 4.8
#LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/static.lds #LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/static.lds

View File

@ -2038,8 +2038,7 @@ enum {
TCC_OPTION_MD, TCC_OPTION_MD,
TCC_OPTION_MF, TCC_OPTION_MF,
TCC_OPTION_x, TCC_OPTION_x,
TCC_OPTION_stack, TCC_OPTION_stack
TCC_OPTION_nobss
}; };
#define TCC_OPTION_HAS_ARG 0x0001 #define TCC_OPTION_HAS_ARG 0x0001
@ -2101,7 +2100,6 @@ static const TCCOption tcc_options[] = {
{ "MF", TCC_OPTION_MF, TCC_OPTION_HAS_ARG }, { "MF", TCC_OPTION_MF, TCC_OPTION_HAS_ARG },
{ "x", TCC_OPTION_x, TCC_OPTION_HAS_ARG }, { "x", TCC_OPTION_x, TCC_OPTION_HAS_ARG },
{ "stack", TCC_OPTION_stack, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP}, { "stack", TCC_OPTION_stack, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP},
{ "nobss", TCC_OPTION_nobss, 0 },
{ NULL, 0, 0 }, { NULL, 0, 0 },
}; };
@ -2434,9 +2432,6 @@ ST_FUNC int tcc_parse_args1(TCCState *s, int argc, char **argv)
s->pe_stack_size = strtoul(optarg+1, NULL, 10); s->pe_stack_size = strtoul(optarg+1, NULL, 10);
#endif #endif
break; break;
case TCC_OPTION_nobss:
s->nobss = 1;
break;
default: default:
if (s->warn_unsupported) { if (s->warn_unsupported) {
unsupported_option: unsupported_option:

View File

@ -128,8 +128,6 @@ static void help(void)
" -Bdir use 'dir' as tcc internal library and include path\n" " -Bdir use 'dir' as tcc internal library and include path\n"
" -MD generate target dependencies for make\n" " -MD generate target dependencies for make\n"
" -MF depfile put generated dependencies here\n" " -MF depfile put generated dependencies here\n"
"For KolibriOS only:\n"
" -nobss do not emit BSS section into file\n"
); );
} }

View File

@ -871,7 +871,6 @@ struct TCCState {
int do_bench; /* option -bench */ int do_bench; /* option -bench */
int gen_deps; /* option -MD */ int gen_deps; /* option -MD */
char *deps_outfile; /* option -MF */ char *deps_outfile; /* option -MF */
int nobss; /* option -nobss, omit BSS section (KolibriOS-only) */
ParseArgsState *parse_args_state; ParseArgsState *parse_args_state;
}; };

View File

@ -273,17 +273,14 @@ int tcc_output_me(TCCState* s1,const char *filename)
fwrite(si->data,1,si->data_size,f); fwrite(si->data,1,si->data_size,f);
for (si=me.data_sections;si;si=si->next) for (si=me.data_sections;si;si=si->next)
fwrite(si->data,1,si->data_size,f); fwrite(si->data,1,si->data_size,f);
if (!s1->nobss) for (si=me.bss_sections;si;si=si->next)
{ {
for (si=me.bss_sections;si;si=si->next) if (si->data == NULL)
{ {
if (si->data == NULL) // printf("\nError! BSS data is NULL! size:%i",(int)si->data_size);
{ si->data = calloc(si->data_size, 1);
// 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);
}
fwrite(si->data, 1, si->data_size, f);
}
} }
/* /*
if (me.bss_sections) // Siemargl testin, what we lose if (me.bss_sections) // Siemargl testin, what we lose