diff options
| author | grischka <grischka> | 2016-10-19 19:21:27 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2016-10-19 19:21:27 +0200 |
| commit | bfd1c08d6c579445fe75dd633fbd9b0757cea5d0 (patch) | |
| tree | 299e8c05200731561bd7f6bbe3d733fd9c3a4e94 /tccelf.c | |
| parent | 02919cd27506e25dacdbe72dad1ae2718eb75991 (diff) | |
| download | tinycc-bfd1c08d6c579445fe75dd633fbd9b0757cea5d0.tar.gz tinycc-bfd1c08d6c579445fe75dd633fbd9b0757cea5d0.tar.bz2 | |
tccrun/win64: cleanup runtime function table
- call RtlDeleteFunctionTable
(important for multiple compilations)
- the RUNTIME_FUNCTION* is now at the beginning of the
runtime memory. Therefor when tcc_relocate is called
with user memory, this should be done manually before
it is free'd:
RtlDeleteFunctionTable(*(void**)user_mem);
[ free(user_mem); ]
- x86_64-gen.c: expand char/short return values to int
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1735,6 +1735,7 @@ static void put_dt(Section *dynamic, int dt, addr_t val) dyn->d_un.d_val = val; } +#ifndef TCC_TARGET_PE static void add_init_array_defines(TCCState *s1, const char *section_name) { Section *s; @@ -1762,6 +1763,7 @@ static void add_init_array_defines(TCCState *s1, const char *section_name) ELFW(ST_INFO)(STB_GLOBAL, STT_NOTYPE), 0, s->sh_num, sym_end); } +#endif static int tcc_add_support(TCCState *s1, const char *filename) { @@ -1842,10 +1844,12 @@ ST_FUNC void tcc_add_linker_symbols(TCCState *s1) bss_section->data_offset, 0, ELFW(ST_INFO)(STB_GLOBAL, STT_NOTYPE), 0, bss_section->sh_num, "_end"); +#ifndef TCC_TARGET_PE /* horrible new standard ldscript defines */ add_init_array_defines(s1, ".preinit_array"); add_init_array_defines(s1, ".init_array"); add_init_array_defines(s1, ".fini_array"); +#endif /* add start and stop symbols for sections whose name can be expressed in C */ |
