aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 5f526df..e3c62b8 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -1564,7 +1564,10 @@ ST_FUNC void tcc_add_bcheck(TCCState *s1)
pinit = section_ptr_add(init_section, 5);
pinit[0] = 0xe8;
put32(pinit + 1, -4);
- sym_index = find_elf_sym(symtab_section, "__bound_init");
+ tcc_add_support(s1, "bcheck.o");
+ 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);
}