diff options
| author | grischka <grischka> | 2012-03-05 20:15:56 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2012-03-05 20:15:56 +0100 |
| commit | a35b3059bb0aaaa5965022ad317aaba27e22f148 (patch) | |
| tree | 17df79be55c72aafe2d1856a20fc1c367c9e20e4 /tccpe.c | |
| parent | a0db7162af0f694c25b278984ac66a46fa099000 (diff) | |
| download | tinycc-a35b3059bb0aaaa5965022ad317aaba27e22f148.tar.gz tinycc-a35b3059bb0aaaa5965022ad317aaba27e22f148.tar.bz2 | |
tcc.h: define TCC_IS_NATIVE
- disable tccrun feature for non-native (cross-) compilers
- define uplong for target adress size
- fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
Diffstat (limited to 'tccpe.c')
| -rw-r--r-- | tccpe.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -38,10 +38,6 @@ # define ADDR3264 DWORD #endif -#if defined _WIN32 && (defined _WIN64) == (defined TCC_TARGET_X86_64) -#define TCC_IS_NATIVE -#endif - #ifdef _WIN32 void dbg_printf (const char *fmt, ...) { @@ -339,7 +335,7 @@ struct pe_info { const char *filename; int type; DWORD sizeofheaders; - DWORD imagebase; + ADDR3264 imagebase; DWORD start_addr; DWORD imp_offs; DWORD imp_size; @@ -1870,11 +1866,10 @@ ST_FUNC int pe_output_file(TCCState * s1, const char *filename) ret = pe_write(&pe); tcc_free(pe.sec_info); } else { -#ifndef TCC_IS_NATIVE - tcc_error_noabort("-run supported only on native platform"); -#endif +#ifdef TCC_IS_NATIVE pe.thunk = data_section; pe_build_imports(&pe); +#endif } #ifdef PE_PRINT_SECTIONS |
