From ddd461dcc866d17f1c89137dc275ce1da95e7be2 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 8 Oct 2016 02:44:17 +0200 Subject: Fix initializing members multiple times When intializing members where the initializer needs relocations and the member is initialized multiple times we can't allow that to lead to multiple relocations to the same place. The last one must win. --- tcc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index fb104fa..93544f0 100644 --- a/tcc.h +++ b/tcc.h @@ -1384,6 +1384,8 @@ ST_FUNC void tcc_add_runtime(TCCState *s1); ST_FUNC void build_got_entries(TCCState *s1); ST_FUNC struct sym_attr *get_sym_attr(TCCState *s1, int index, int alloc); +ST_FUNC void squeeze_multi_relocs(Section *sec, size_t oldrelocoffset); + ST_FUNC addr_t get_elf_sym_addr(TCCState *s, const char *name, int err); #if defined TCC_IS_NATIVE || defined TCC_TARGET_PE ST_FUNC void *tcc_get_symbol_err(TCCState *s, const char *name); -- cgit v1.3.1