diff options
| author | grischka <grischka> | 2009-12-19 22:22:43 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2009-12-19 22:22:43 +0100 |
| commit | 7fa712e00c5221d9373e8f8fa073e9e6fa064da1 (patch) | |
| tree | 21c5acbfcb4ddaa6d61d30fe79cfaece3ff7b5d9 /libtcc.c | |
| parent | 8bbde91f62291cb0383c2406ae6123be903c944b (diff) | |
| download | tinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.gz tinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.bz2 | |
win32: enable bounds checker & exception handler
exception handler borrowed from k1w1. Thanks.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -58,9 +58,13 @@ static Section *cur_text_section; /* current section where function code is #ifdef CONFIG_TCC_ASM static Section *last_text_section; /* to handle .previous asm directive */ #endif + +#ifdef CONFIG_TCC_BCHECK /* bound check related sections */ static Section *bounds_section; /* contains global data bound description */ static Section *lbounds_section; /* contains local data bound description */ +#endif + /* symbol sections */ static Section *symtab_section, *strtab_section; @@ -109,8 +113,8 @@ static int tcc_ext = 1; /* max number of callers shown if error */ #ifdef CONFIG_TCC_BACKTRACE int num_callers = 6; +void *rt_prog_main; const char **rt_bound_error_msg; -unsigned long rt_prog_main; #endif /* XXX: get rid of this ASAP */ @@ -731,7 +735,7 @@ static void put_extern_sym2(Sym *sym, Section *section, /* if bound checking is activated, we change some function names by adding the "__bound" prefix */ switch(sym->v) { -#if 0 +#ifdef TCC_TARGET_PE /* XXX: we rely only on malloc hooks */ case TOK_malloc: case TOK_free: |
