diff options
| author | Ali Gholami Rudi <ali@rudi.ir> | 2010-02-04 23:08:01 +0330 |
|---|---|---|
| committer | Ali Gholami Rudi <ali@rudi.ir> | 2010-02-05 08:25:48 +0330 |
| commit | d63ec6f20dc7e29e266589458ea90fb56f8c86ea (patch) | |
| tree | 5edbcb7772b18116b52a7b20f7bfeb558c09d4e7 /libtcc.c | |
| parent | b9aeac0a64f11baa0f88dae09edef6802e84b83f (diff) | |
| download | tinycc-d63ec6f20dc7e29e266589458ea90fb56f8c86ea.tar.gz tinycc-d63ec6f20dc7e29e266589458ea90fb56f8c86ea.tar.bz2 | |
fill got table for static linking
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |
