diff options
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1689,6 +1689,7 @@ int tcc_relocate(TCCState *s1, void *ptr) if (s1->nb_errors) return -1; +#ifndef TCC_TARGET_PE #ifdef TCC_TARGET_X86_64 s1->runtime_plt_and_got_offset = 0; s1->runtime_plt_and_got = (char *)(mem + offset); @@ -1696,6 +1697,7 @@ int tcc_relocate(TCCState *s1, void *ptr) XXX: calculate exact size for them? */ offset *= 2; #endif +#endif if (0 == mem) return offset + 15; @@ -1722,10 +1724,12 @@ int tcc_relocate(TCCState *s1, void *ptr) if (s->sh_flags & SHF_EXECINSTR) set_pages_executable(ptr, length); } +#ifndef TCC_TARGET_PE #ifdef TCC_TARGET_X86_64 set_pages_executable(s1->runtime_plt_and_got, s1->runtime_plt_and_got_offset); #endif +#endif return 0; } @@ -1859,6 +1863,9 @@ TCCState *tcc_new(void) #endif #ifdef TCC_TARGET_PE tcc_define_symbol(s, "_WIN32", NULL); +#ifdef TCC_TARGET_X86_64 + tcc_define_symbol(s, "_WIN64", NULL); +#endif #else tcc_define_symbol(s, "__unix__", NULL); tcc_define_symbol(s, "__unix", NULL); |
