grischka
a35b3059bb
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)
2012-03-05 20:15:56 +01:00
grischka
bf374a5f23
rename error/warning -> tcc_(error/warning)
2011-08-11 17:07:56 +02:00
grischka
e844fb11c2
libtcc: support more than one crtprefix
...
Looks like gcc has that. Oh Deer!
2011-08-06 16:49:30 +02:00
grischka
aa80e5b1ff
tccpe: cleanup ELFW() macros etc.
2011-07-14 19:23:04 +02:00
grischka
df4c0892f3
tccrun: win64: add unwind function table for dynamic code
...
This works only when tcc.exe is compiled using MSC. MinGW does
something in the startup code that defeats it.
2011-07-14 19:09:49 +02:00
grischka
5280293d6b
make: create native tcc from separate objects
...
This was already possible using
make NOTALLINONE=1
and is now the default.
To build as previously from one big source, use
make ONE_SOURCE=1
Cross compilers are still build from one source because using
separate objects requires separate build directories one per
platform which currently is not (yet) supported by the makefile.
We could probably use gnu-makeish target variables like
$(I386_CROSS): OUTDIR=build/i386
$(X64_CROSS): OUTDIR=build/x86-64
and so on ...
Also NEED_FLOAT_TYPES for arm-gen is removed. It was about
variables that are referenced from outside (libtcc, tccgen).
We could declare them in tcc.h (as with reg_classes) or have
them twice in arm-gen.c. I chose option 2.
2011-07-14 18:45:37 +02:00
grischka
45184e01d8
win32: add -Wl,--stack=xxx switch
...
For example:
$ tcc -Wl,--stack=4194309
which means 4 MB. Default is 1 MB.
2011-07-11 18:47:16 +02:00
grischka
a3ebdd0aeb
tccpe: support leading underscore for symbols
...
To make this the default, enable this line in libtcc.c:tcc_new:
#if defined(TCC_TARGET_PE) && 0
s->leading_underscore = 1;
and then recompile tcc and also libtcc1.a
2011-02-13 17:44:12 +01:00
Henry Kroll III
a2779556b4
split cross libtcc1.a to separate directories
2010-12-02 03:08:57 -08:00
Henry Kroll III
03b23994f1
tccpe.c: fallback to libtcc1.a for other targets (ARM)
2010-11-30 18:52:43 -08:00
Henry Kroll III
c1a437add7
tccpe.c: Makefile: --enable-cross win64 cross library build
2010-11-30 15:15:55 -08:00
grischka
f332bb3bca
tccpe: typedef unsigned int DWORD for cross compilers.
...
This fixes the i386-win32-tcc cross-compiler on x86-64 linux
platform.
I verified that it produces identical binaries for 'hello_win.exe'
and 'tcc.exe' (tcc compiled by itself) compared to the output of
the native tcc on windows.
2010-11-27 15:02:57 +01:00
Timo VJ Lahde
809f489662
WinCE PE subsystem
2010-04-19 16:34:59 +03:00
Timo VJ Lahde
2cb1fd6a10
PE ARM: jump IAT arm code
2010-04-19 15:50:22 +03:00
grischka
2341ee5142
tccpe: improve dllimport/export and use for tcc_add_symbol
2010-01-14 20:59:42 +01:00
grischka
4a01eb09d8
use vpushv in some places
2009-12-20 01:54:38 +01:00
grischka
50b040ef83
win64: add tiny unwind data for setjmp/longjmp
...
This enables native unwind semantics with longjmp on
win64 by putting an entry into the .pdata section for
each compiled fuction.
Also, the function now use a fixed stack and store arguments
into X(%rsp) rather than using push.
2009-12-20 01:54:37 +01:00
grischka
88a3ccab9f
allow tcc be build from separate objects
...
If you want that, run: make NOTALLINONE=1
2009-12-20 01:53:49 +01:00
grischka
7fa712e00c
win32: enable bounds checker & exception handler
...
exception handler borrowed from k1w1. Thanks.
2009-12-19 22:22:43 +01:00
grischka
3020a4765d
tccpe: with -l try also with "lib" prefix
...
-lfoo searches: foo.def, libfoo.def, foo.dll, libfoo.dll
2009-12-19 22:16:21 +01:00
grischka
94bf4d2c22
tccpe: improve dllimport
2009-12-19 22:16:21 +01:00
grischka
1445fea582
tccpe: allow linkage to extern symbols from asm
2009-12-19 22:16:18 +01:00
grischka
a5279b2c05
tccpe: fclose FILE*
...
Reported by Martin Ettl (thanks)
2009-11-30 17:14:37 +01:00
Frederic Feret
b7d7af4fa2
ARM: first support for arm-pe target
2009-11-13 18:09:00 +01:00
Frederic Feret
2f73e42d87
various fixes and new options for PE format
2009-11-13 18:09:00 +01:00
grischka
834b782a9c
tccpe: fill checksum header field
2009-08-24 13:30:02 +02:00
grischka
c998985c74
cleanup: constify some global data
2009-07-18 22:07:42 +02:00
grischka
94ae3984b0
tccpe: set tcc_lib_path from DLL
2009-07-18 22:07:33 +02:00
grischka
1df662c1b0
tccpe: load dll on the fly
2009-07-18 22:07:25 +02:00
grischka
fc977d56c9
x86-64: chkstk, alloca
2009-07-18 22:06:54 +02:00
grischka
035918ef2f
win64: fix pointer <-> unsigned long typecast issues
2009-07-18 22:05:58 +02:00
grischka
719ba918dd
tccpe: use more official structs
2009-07-18 21:55:32 +02:00
grischka
f366cb20fe
tccpe: support pe32+ (x86_64) target
2009-07-18 21:55:28 +02:00
grischka
fe8def3303
tccpe: use ElfW macros
2009-07-18 21:55:25 +02:00
grischka
dcfad3af49
tccpe: get rid of kludgy export-symbol sort
2009-07-18 21:55:20 +02:00
grischka
370cdeb628
tccpe: build IAT vector with with -run too
...
This prepares for x86_64 where we need the vector
for far jumps. Also, resolve DLL symbols in place
2009-07-18 21:55:15 +02:00
grischka
f9181416f6
move some global variables into TCCState
2009-05-11 18:45:44 +02:00
grischka
4a8c2229ce
win32: allow user segments as writable & executable
2009-04-18 15:07:08 +02:00
grischka
f9bf48d643
release loaded dlls cleanly (Sam K)
2008-05-05 22:40:49 +00:00
grischka
5342b32eef
Switch to newer tccpe.c (includes support for resources)
2007-12-19 17:36:42 +00:00
grischka
34140dd627
Use _WIN32 for a windows hosted tcc and define it for the PE target.
2007-12-13 19:07:19 +00:00
bellard
b78d3ff1dc
the PE linker code is not ready for -fleading-underscore support
2005-06-17 21:31:04 +00:00
bellard
0c7f0ed312
added -f[no-]leading-underscore
2005-06-15 22:32:10 +00:00
bellard
fe9b1f60ce
win32 merge (grischka)
2005-04-17 13:15:54 +00:00
bellard
4821702fb4
win32 merge
2005-04-14 23:49:21 +00:00
bellard
d733dc752e
better st_other support
2005-04-13 21:37:06 +00:00
bellard
2c538d7a2b
initial PE format support
2005-04-10 21:46:58 +00:00