aboutsummaryrefslogtreecommitdiff
path: root/tccpe.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-12-19 22:22:43 +0100
committergrischka <grischka>2009-12-19 22:22:43 +0100
commit7fa712e00c5221d9373e8f8fa073e9e6fa064da1 (patch)
tree21c5acbfcb4ddaa6d61d30fe79cfaece3ff7b5d9 /tccpe.c
parent8bbde91f62291cb0383c2406ae6123be903c944b (diff)
downloadtinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.gz
tinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.bz2
win32: enable bounds checker & exception handler
exception handler borrowed from k1w1. Thanks.
Diffstat (limited to 'tccpe.c')
-rw-r--r--tccpe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tccpe.c b/tccpe.c
index 69161f9..d603a5e 100644
--- a/tccpe.c
+++ b/tccpe.c
@@ -1700,15 +1700,15 @@ PUB_FN int pe_output_file(TCCState * s1, const char *filename)
pe.filename = filename;
pe.s1 = s1;
+ tcc_add_bcheck(s1);
pe_add_runtime_ex(s1, &pe);
relocate_common_syms(); /* assign bss adresses */
tcc_add_linker_symbols(s1);
ret = pe_check_symbols(&pe);
if (ret)
- return ret;
-
- if (filename) {
+ ;
+ else if (filename) {
if (PE_DLL == pe.type) {
pe.reloc = new_section(pe.s1, ".reloc", SHT_PROGBITS, 0);
/* XXX: check if is correct for arm-pe target */