aboutsummaryrefslogtreecommitdiff
path: root/tccpe.c
Commit message (Collapse)AuthorAgeFilesLines
* win64: fix resource file supportgrischka2014-08-011-28/+24
|
* tccpe: adjust for new 'hidden' symbols featuregrischka2014-04-171-8/+8
| | | | | in order to avoid conflicts with windows specific (ab)usage of the Elf32_Sym -> st_other field.
* tccpe: speed up .def file loadinggrischka2014-04-131-17/+7
| | | | | The fgets replacement meant to work with "int fd" was just too slow.
* tcctest: add back testXb (self compile with -b)grischka2014-01-211-1/+1
| | | | | | | | | | | | | | | | | | - Thanks to Kirill "tcc -b itself" should work now (was removed in d5f4df09ff4a84dda5b03525285f03be7723376b) Also: - tests/Makefile: - fix spurious --I from 767410b8750b45d63805b45ca1a2cf34d7cb4923 - lookup boundtest.c via VPATH (for out-of-tree build) - test[123]b?: fail on diff error - Windows: test3 now works (from e31579b0769e1f9c0947d12e83316d1149307b1a) - abitest: a libtcc.a made by gcc is not usable for tcc on WIndows - using source instead (libtcc.c) - tccpe: - avoid gcc warning (x86_64)
* tccpe: cleanup "imports per ordinal"grischka2014-01-061-34/+33
| | | | | | | - tccpe.c: avoid conflict with imp_sym->st_value, cleanup - _parseLibs.bat, _tcc.bat: no instructions for usage, removed. from commit 642b6d0f50c6b6a842c9239a102fe34d5619e931
* i386: use __fixdfdi instead of __tcc_cvt_ftolgrischka2014-01-061-0/+2
| | | | | | | | | | | | Variants __fixsfdi/__fixxfdi are not needed for now because the value is converted to double always. Also: - remove __tcc_fpinit for unix as it seems redundant by the __setfpucw call in the startup code - avoid reference to s->runtime_main in cross compilers - configure: fix --with-libgcc help - tcctok.h: cleanup
* Add the possibility to use noname functions by ordinalYX Hao2013-09-191-6/+32
| | | | | | | | | | | | | | | | | | | | | tcc.c: process.h:177:20: note: expected 'char * const*' but argument is of type 'char const*const*' tccpe.c: Add the possibility to use noname functions by ordinal. use def file: "AliasName @n" build-tcc.bat: 1. Enable 32 bits mode on 64 bits OS. 2. build doc. _parseLibs.bat: Convenient to use "*.def + *.c" instead of *.a, just use -l* _tcc.bat: a practice of _parseLibs.bat Signed-off-by: YX Hao <lifenjoiner@163.com>
* win32: fix libtcc supportgrischka2013-09-101-3/+4
| | | | | | | | | | | | | | For "tcc -run file.c", I was trying to initialize the FP control in a function in libtcc1.a (_runmain) before calling main. Unfortunately that turned out to cause problems with for example libtcc_test since such usage doesn't necessarily define a 'main' function. So for tcc -run we're back to relying on the FP control word that is set in the startup code of tcc.exe rsp. libtcc.dll. This fixes part of commit 73faaea227a53e365dd75f1dba7a5071c7b5e541
* i386-gen: preserve fp control word in gen_cvt_ftoigrischka2013-08-281-17/+5
| | | | | | | | | | | | | | | | | | | | | | | - Use runtime function for conversion - Also initialize fp with tcc -run on windows This fixes a bug where double x = 1.0; double y = 1.0000000000000001; double z = x < y ? 0 : sqrt (x*x - y*y); caused a bad sqrt because rounding precision for the x < y comparison was different to the one used within the sqrt function. This also fixes a bug where printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2)); would print 100, 99 Unrelated: win32: document relative include & lib lookup win32: normalize_slashes: do not mirror silly gcc behavior This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890 winapi: add missing WINAPI decl. for some functions
* tccpe: pstrcpy() will truncate .stabstr section name, use strncpy() instead.Roy2013-06-061-1/+1
|
* add version number to manpageUrs Janssen2013-02-171-1/+1
| | | | | | | avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English)
* libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)grischka2013-02-121-28/+30
| | | | | | | | | | | | | | | | | | | This replaces -> use instead: ----------------------------------- - tcc_set_linker -> tcc_set_options(s, "-Wl,..."); - tcc_set_warning -> tcc_set_options(s, "-W..."); - tcc_enable_debug -> tcc_set_options(s, "-g"); parse_args is moved to libtcc.c (now tcc_parse_args). Also some cleanups: - reorder TCCState members - add some comments here and there - do not use argv's directly, make string copies - use const char* in tcc_set_linker - tccpe: use fd instead of fp tested with -D MEM_DEBUG: 0 bytes left
* win32: Honor "-Wl,-subsystem=console/gui" optiongrischka2013-02-041-9/+10
|
* portability: fix void* <-> target address conversion confusiongrischka2013-02-041-7/+7
| | | | | | - #define addr_t as ElfW(Addr) - replace uplong by addr_t - #define TCC_HAS_RUNTIME_PLTGOT and use it
* safety: replace occurrences of strcpy by pstrcpygrischka2013-01-311-3/+3
|
* tccpe: no debug, no stabsgrischka2013-01-301-1/+4
|
* Revert "Added what I call virtual io to tinycc this way we can make a ↵Thomas Preud'homme2013-01-141-2/+2
| | | | | | | | monolitic executable or library that contains all needed to compile programs, truly tinycc portable." This reverts commit 59e18aee0e509a3ca75dbe6f909e18c1d17893d1. tcc is being stabilized now in order to do a new release soon. Therefore, such a change is not appropriate now.
* Revert "pe: fix tcc not linking to user32 and gdi32"Thomas Preud'homme2013-01-141-1/+1
| | | | | | This reverts commit 943574aba54713ca4a17fe33aadde5abee233b53. The empty string in "libs" was intended behavior, as can be seen from the "if (0 == *p)" below.
* Added what I call virtual io to tinycc this way we can make a monolitic ↵mingodad2013-01-111-2/+2
| | | | | | executable or library that contains all needed to compile programs, truly tinycc portable. Tested under linux exec the "mk-it" shell script and you'll end up with a portable tinycc executable that doesn't depend on anything else.
* pe: fix tcc not linking to user32 and gdi32Roy Tam2012-11-021-1/+1
|
* tcc.h: define TCC_IS_NATIVEgrischka2012-03-051-8/+3
| | | | | | - disable tccrun feature for non-native (cross-) compilers - define uplong for target adress size - fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
* rename error/warning -> tcc_(error/warning)grischka2011-08-111-6/+6
|
* libtcc: support more than one crtprefixgrischka2011-08-061-15/+0
| | | | Looks like gcc has that. Oh Deer!
* tccpe: cleanup ELFW() macros etc.grischka2011-07-141-32/+14
|
* tccrun: win64: add unwind function table for dynamic codegrischka2011-07-141-38/+49
| | | | | This works only when tcc.exe is compiled using MSC. MinGW does something in the startup code that defeats it.
* make: create native tcc from separate objectsgrischka2011-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* win32: add -Wl,--stack=xxx switchgrischka2011-07-111-0/+2
| | | | | | | | For example: $ tcc -Wl,--stack=4194309 which means 4 MB. Default is 1 MB.
* tccpe: support leading underscore for symbolsgrischka2011-02-131-23/+39
| | | | | | | | | 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
* split cross libtcc1.a to separate directoriesHenry Kroll III2010-12-021-8/+1
|
* tccpe.c: fallback to libtcc1.a for other targets (ARM)Henry Kroll III2010-11-301-2/+4
|
* tccpe.c: Makefile: --enable-cross win64 cross library buildHenry Kroll III2010-11-301-1/+6
|
* tccpe: typedef unsigned int DWORD for cross compilers.grischka2010-11-271-5/+5
| | | | | | | | | 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.
* WinCE PE subsystemTimo VJ Lahde2010-04-191-0/+2
|
* PE ARM: jump IAT arm codeTimo VJ Lahde2010-04-191-2/+13
|
* tccpe: improve dllimport/export and use for tcc_add_symbolgrischka2010-01-141-66/+106
|
* use vpushv in some placesgrischka2009-12-201-1/+1
|
* win64: add tiny unwind data for setjmp/longjmpgrischka2009-12-201-2/+60
| | | | | | | | | 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.
* allow tcc be build from separate objectsgrischka2009-12-201-67/+62
| | | | If you want that, run: make NOTALLINONE=1
* win32: enable bounds checker & exception handlergrischka2009-12-191-3/+3
| | | | exception handler borrowed from k1w1. Thanks.
* tccpe: with -l try also with "lib" prefixgrischka2009-12-191-8/+11
| | | | -lfoo searches: foo.def, libfoo.def, foo.dll, libfoo.dll
* tccpe: improve dllimportgrischka2009-12-191-12/+26
|
* tccpe: allow linkage to extern symbols from asmgrischka2009-12-191-0/+23
|
* tccpe: fclose FILE*grischka2009-11-301-0/+2
| | | | Reported by Martin Ettl (thanks)
* ARM: first support for arm-pe targetFrederic Feret2009-11-131-10/+39
|
* various fixes and new options for PE formatFrederic Feret2009-11-131-8/+38
|
* tccpe: fill checksum header fieldgrischka2009-08-241-27/+58
|
* cleanup: constify some global datagrischka2009-07-181-110/+110
|
* tccpe: set tcc_lib_path from DLLgrischka2009-07-181-1/+1
|
* tccpe: load dll on the flygrischka2009-07-181-52/+89
|
* x86-64: chkstk, allocagrischka2009-07-181-7/+2
|