diff options
| author | grischka <grischka> | 2014-04-17 17:01:28 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2014-04-17 17:01:28 +0200 |
| commit | 2ac238fc507b64a8dd2d5d3d5c00210c1ffabea5 (patch) | |
| tree | 935dafb1204a3682ce9bfd74258cf52301b06a4e /libtcc.c | |
| parent | 6b7a6fcbc8b9ed623a436dc2218cfe31b991037c (diff) | |
| download | tinycc-2ac238fc507b64a8dd2d5d3d5c00210c1ffabea5.tar.gz tinycc-2ac238fc507b64a8dd2d5d3d5c00210c1ffabea5.tar.bz2 | |
tccpe: adjust for new 'hidden' symbols feature
in order to avoid conflicts with windows specific (ab)usage
of the Elf32_Sym -> st_other field.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -491,22 +491,22 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, #ifdef TCC_TARGET_PE if (sym->type.t & VT_EXPORT) - other |= 1; + other |= ST_PE_EXPORT; if (sym_type == STT_FUNC && sym->type.ref) { Sym *ref = sym->type.ref; if (ref->a.func_export) - other |= 1; + other |= ST_PE_EXPORT; if (ref->a.func_call == FUNC_STDCALL && can_add_underscore) { sprintf(buf1, "_%s@%d", name, ref->a.func_args * PTR_SIZE); name = buf1; - other |= 2; + other |= ST_PE_STDCALL; can_add_underscore = 0; } } else { if (find_elf_sym(tcc_state->dynsymtab_section, name)) - other |= 4; + other |= ST_PE_IMPORT; if (sym->type.t & VT_IMPORT) - other |= 4; + other |= ST_PE_IMPORT; } #else if (! (sym->type.t & VT_STATIC)) @@ -1316,8 +1316,6 @@ LIBTCCAPI int tcc_add_symbol(TCCState *s, const char *name, const void *val) So it is handled here as if it were in a DLL. */ pe_putimport(s, 0, name, (uintptr_t)val); #else - /* XXX: Same problem on linux but currently "solved" elsewhere - via the rather dirty 'runtime_plt_and_got' hack. */ add_elf_sym(symtab_section, (uintptr_t)val, 0, ELFW(ST_INFO)(STB_GLOBAL, STT_NOTYPE), 0, SHN_ABS, name); |
