From d63ec6f20dc7e29e266589458ea90fb56f8c86ea Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 4 Feb 2010 23:08:01 +0330 Subject: fill got table for static linking --- libtcc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 2f23fe6..bea52de 100644 --- a/libtcc.c +++ b/libtcc.c @@ -372,6 +372,15 @@ ST_FUNC void *section_ptr_add(Section *sec, unsigned long size) return sec->data + offset; } +/* reserve at least 'size' bytes from section start */ +ST_FUNC void section_reserve(Section *sec, unsigned long size) +{ + if (size > sec->data_allocated) + section_realloc(sec, size); + if (size > sec->data_offset) + sec->data_offset = size; +} + /* return a reference to a section, and create it if it does not exists */ ST_FUNC Section *find_section(TCCState *s1, const char *name) -- cgit v1.3.1