Hi! There is no __bound_init() function if program don't have any
bounds to check. There is a test program and tcc patch. Test program
can't be compiled if -b option is used.
int main ()
{
#if 0
// tcc: error: __bound_init not defined
// include v variable definintion to allow a program linking
int v[10];
#endif
return 0;
}
diff -urN tinycc.old/tccelf.c tinycc/tccelf.c
--- tinycc.old/tccelf.c 2015-03-25 18:37:57.000000000 +0300
+++ tinycc/tccelf.c 2015-03-25 18:38:34.000000000 +0300
@@ -1565,6 +1565,8 @@
pinit[0] = 0xe8;
put32(pinit + 1, -4);
sym_index = find_elf_sym(symtab_section, "__bound_init");
+ if (!sym_index)
+ tcc_error("__bound_init not defined");
put_elf_reloc(symtab_section, init_section,
init_section->data_offset - 4, R_386_PC32, sym_index);
}
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel