Commit Graph

823 Commits

Author SHA1 Message Date
Sergei Trofimovich
d97a25fbdd lib/alloca*: mark ELF stack access flags as nonexecutable
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2011-01-04 10:38:52 +02:00
Sergei Trofimovich
288831854b Makefile: respect LDFLAGS (set via --extra-ldflags=)
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2011-01-04 10:22:02 +02:00
Shinichiro Hamaji
0ed7ba3f5e Support struct arguments with stdarg.h
- add __builtin_va_arg_types to check how arguments were passed
- move most code of stdarg into libtcc1.c
- remove __builtin_malloc and __builtin_free
- add a test case based on the bug report
  (http://www.mail-archive.com/tinycc-devel@nongnu.org/msg03036.html)
2010-12-28 19:32:40 +09:00
Shinichiro Hamaji
07fd82b411 Make alignments for struct arguments 8 bytes
The ABI (http://www.x86-64.org/documentation/abi.pdf) says
"The size of each argument gets rounded up to eightbytes"
2010-12-28 19:09:59 +09:00
Shinichiro Hamaji
83f0a7b6f8 Test va_copy in tcctest.c 2010-12-28 17:53:56 +09:00
Shinichiro Hamaji
45e1ae2896 One more fix for tcc -run
We don't need r_addend for addresses in PLT.
2010-12-28 17:44:51 +09:00
Shinichiro Hamaji
d457addfc3 Fix for the previous commit.
R_X86_64_PLT32 for .so doesn't need DLL relocation.
2010-12-28 16:52:21 +09:00
Shinichiro Hamaji
0ae39f1957 Handle r_addend and R_X86_64_PLT32 properly.
- r_addend should be applied for PLT entries as well
- R_X86_64_PLT32 should be handled just like R_X86_64_PC32
- spec says GLOB_DAT and JUMP_SLOT don't need r_addend (not tested)
  http://www.x86-64.org/documentation/abi.pdf

Now we can -run ELF objects generated by GCC.
2010-12-28 16:14:30 +09:00
Henry Kroll III
48e325df3c configure: --sharedir defaults to /usr/local/share 2010-12-23 06:36:07 -08:00
Henry Kroll III
f449f98dec configure: --sharedir documentation root 2010-12-22 04:42:39 -08:00
Henry Kroll III
44f7055a04 make: fix cannot find -ltcc with --disable-rpath 2010-12-21 09:47:17 -08:00
Henry Kroll III
73cb4392ab make: fix install with CC=tcc and potential link problem 2010-12-20 06:20:08 -08:00
Henry Kroll III
90355c78ed configure: add --disable-rpath option (Fedora) 2010-12-20 05:55:54 -08:00
Henry Kroll III
3b3a7cc8ba configure: improvements to option --tccdir 2010-12-20 05:38:59 -08:00
Henry Kroll III
d16722481f tcc: add unsupported option -pedantic 2010-12-20 04:23:30 -08:00
Henry Kroll III
8f98573658 tcc: -m32 prefix "win32-" when file extension is present 2010-12-13 00:00:18 -08:00
Henry Kroll III
c6f5d819af tcc: fix format string in error handler 2010-12-08 01:05:50 -08:00
Henry Kroll III
ffb9fcc5a2 tcc: oops, error handler does not accept format strings 2010-12-08 00:52:33 -08:00
Henry Kroll III
b3be007afa tcc: fix -m32 and add -m64 option 2010-12-08 00:27:06 -08:00
Henry Kroll III
f3d3ab5a69 tcc: move undef out of if block 2010-12-06 16:36:00 -08:00
Henry Kroll III
10a08a372f Merge branch 'mob' of git://repo.or.cz/tinycc into kroll 2010-12-06 16:25:33 -08:00
Henry Kroll III
bb7bb37fe2 tcc: add -m32 option to x86_64 cross compilers 2010-12-06 16:17:20 -08:00
Shinichiro Hamaji
f2d7998a96 Copy tcclib.h to tests directory so GCC uses its own headers.
86ffc48129

removed this cp command. However, it was necessary to pass tests on x86-64
because include/stdarg.h is different from GCC's definition on x86-64.
2010-12-07 03:04:45 +09:00
Henry Kroll III
33f86ada92 trim unnecessary bits from my previous 3 commits 2010-12-05 12:47:50 -08:00
Henry Kroll III
1c821373ad make: i386/libtcc1.a for i386-tcc (x86_64 to i386 cross) 2010-12-05 01:04:28 -08:00
Henry Kroll III
50ff5ed790 make: cross compilers exist before using them (fixes parallel make) 2010-12-04 20:15:37 -08:00
Henry Kroll III
eb550ed23b tcc: add option -s for gcc compatibility (ignored) 2010-12-04 16:04:33 -08:00
grischka
69fe7585a2 tiny_libmaker: strip leading directory to avoid buffer overrun
The arhdr.ar_name has 16 bytes.  Long object names esp. with
leading directory were causing a buffer overrun which was
detected by glibc.
2010-12-04 16:56:58 +01:00
grischka
21c2a68aa0 tccelf/tcccoff: fix some type conversion warnings 2010-12-04 16:48:15 +01:00
grischka
86ffc48129 make: new lib/Makefile for libtcc1.a on more platforms
win32/64 cross-compilers now build libtcc1.a and install it
together with the windows headers in a 'win32' sub-directory
of TCCDIR.
2010-12-04 16:47:08 +01:00
Henry Kroll III
2ce9a0e2fe needs lib path on bcheck.o fixes undefined symbol '__try__' 2010-12-02 21:43:46 -08:00
Henry Kroll III
3b8b290a45 make cross compilers an expert option in configure --help 2010-12-02 20:33:11 -08:00
Henry Kroll III
94e72b16e7 Add --enable-cygwin option to build on windows with cygwin+mingw32 2010-12-02 20:16:32 -08:00
Henry Kroll III
c5d3ce684a Changelog: document some of the recent changes 2010-12-02 14:41:26 -08:00
Henry Kroll III
2215567d7a Makefile: fix clean target, bcheck, add comments 2010-12-02 14:39:34 -08: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
165d136614 Makefile: cleanup leftovers on cross build. really works now 2010-11-30 16:17:37 -08:00
Henry Kroll III
93ef24e6fe Makefile: fix typo and resulting workaround 2010-11-30 16:08:33 -08:00
Henry Kroll III
b7d89ff822 Makefile: fix Linux cross install, cleanup 2010-11-30 15:35:32 -08:00
Henry Kroll III
c1a437add7 tccpe.c: Makefile: --enable-cross win64 cross library build 2010-11-30 15:15:55 -08:00
Henry Kroll III
9e406656c7 tcc.c: skip -lpthread when -c option specified 2010-11-30 13:58:18 -08:00
Henry Kroll III
0d38e3b663 make CC=tcc install: fixes strip:tcc: File format not recognized 2010-11-30 13:34:09 -08:00
Henry Kroll III
8185070841 Makefile: Add .PHONY targets 2010-11-30 13:09:16 -08:00
Henry Kroll III
52b75c5fa0 Makefile: Put i386-win32-tcc back into --enable-cross install 2010-11-30 02:42:38 -08:00
Henry Kroll III
7b18df138d Makefile: build --config-cross libtcc1.a directly to win32/lib 2010-11-30 01:49:34 -08:00
Henry Kroll III
48a2a8dabd Remove unnecessary $(PROGS_CROSS) from non-cross builds. 2010-11-29 21:09:20 -08:00
Henry Kroll III
ddea94daea Makefile: TCC=tcc 2010-11-28 16:11:40 -08:00
Henry Kroll III
9a986f374e configure: allow changing installation directory 2010-11-28 15:54:27 -08:00
Henry Kroll III
3d35b6b36d Makefile: --enable-cross on x86_64 simplified 2010-11-28 15:51:03 -08:00