Commit Graph
684 Commits
Author SHA1 Message Date
Anthony Green 8fa2812355 Merge pull request #116 from frida/fix/darwin-aarch64-variadic
Fix handling of variadic calls on Darwin/AArch64
2014-04-12 19:32:08 -04:00
Anthony Green 8a58e6b780 Merge pull request #115 from frida/fix/darwin-aarch64-alignment
Fix alignment of AArch64 assembler functions
2014-04-12 19:30:18 -04:00
Anthony Green 30b77c56f9 Merge pull request #117 from frida/fix/windows-regression
Fix Windows regression
2014-04-12 19:29:13 -04:00
Ole André Vadla Ravnås 3e2b84d295 Fix Windows regression
Introduced by b5fed60194.
2014-04-12 01:06:09 +02:00
Ole André Vadla Ravnås 419503f409 Fix handling of variadic calls on Darwin/AArch64 2014-04-06 20:59:25 +02:00
Ole André Vadla Ravnås a539f7ffd6 Fix alignment of AArch64 assembler functions 2014-04-06 20:57:32 +02:00
Anthony Green dc33cb3c99 Merge pull request #114 from joshtriplett/bounce-on-a-tiny-trampoline
Fix ABI on 32-bit non-Windows x86: go back to trampoline size 10
2014-04-05 23:41:22 -04:00
Josh Triplett b5fed60194 Fix ABI on 32-bit non-Windows x86: go back to trampoline size 10
The trampoline size is part of the ABI, so it cannot change.  Move the
logic from the stdcall and thiscall trampolines to the functions they
call, to reduce them both to 10 bytes.

This drops the previously added support for raw THISCALL closures on
non-Windows.  (Non-raw THISCALL closures still work.)
2014-04-05 17:33:42 -07:00
Anthony Green c860a992fe Upgrade version to 3.1-rc1 2014-03-25 17:02:51 -04:00
Anthony Green 9837073e62 Update copyright date and clean up README notes. 2014-03-25 16:24:14 -04:00
Anthony Green 18d3baa9f5 Merge pull request #108 from joshtriplett/freebsd
[3.1 blocker] Fix FreeBSD support
2014-03-25 16:12:53 -04:00
Anthony Green afee53738a Merge pull request #106 from joshtriplett/darwin-award
[3.1 blocker] Update OS X build system to include win32.S on 32-bit
2014-03-25 16:12:35 -04:00
Anthony Green 7d2478568e Merge pull request #110 from joshtriplett/w64
Fix 64-bit Windows support
2014-03-25 16:12:17 -04:00
Anthony Green beab5f334d Merge pull request #105 from joshtriplett/win32-relocations
[3.1 blocker] win32.S needs to handle relocations/GOT
2014-03-25 16:07:47 -04:00
Josh Triplett f0c8a31577 Compile win32.S on FreeBSD 2014-03-25 10:10:51 -07:00
Josh Triplett b2d610e028 Compile win32.S on 32-bit Darwin as well 2014-03-24 21:45:47 -07:00
Josh Triplett be50b87a49 Always use configure to detect whether global symbols need underscores
64-bit Windows already used this check; make it universal, and use it in
place of an ifdef on X86_WIN32, to handle non-Windows platforms that use
the underscore, such as Darwin.
2014-03-24 21:45:47 -07:00
Josh Triplett 56be47f876 Fix a warning on 64-bit Windows
When sizeof(size_t) != sizeof(unsigned), adding a size_t to cif->bytes
produces a "possible loss of data" warning.  However, the size_t in
question refers to the size of a single parameter.  Use a cast to avoid
the warning.
2014-03-24 21:24:53 -07:00
Josh Triplett 48a8eda74a Avoid referencing undefined ABIs on 64-bit Windows builds
64-bit Windows does not have FFI_STDCALL, FFI_THISCALL, or FFI_FASTCALL.
2014-03-24 21:21:12 -07:00
Josh Triplett f0f4138f90 win32.S: Add handling for position-independent code on Darwin
Newer versions of Darwin generate the necessary stub functions
automatically and just need a call instruction, but accomodating older
versions as well requires adding the stub.
2014-03-22 10:04:11 -07:00
Josh Triplett ef5890ebaf win32.S: Use shifting for multiplication rather than repeated addition
The jump table code added a register to itself twice to multiply by 4;
shift the register left by 2 instead.
2014-03-21 11:02:50 -07:00
Josh Triplett 4fca48901e win32.S: Make the jump tables position-independent
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code.  This fixes build failures on
target platforms that do not allow text relocations.
2014-03-21 11:00:41 -07:00
Josh Triplett 2087dcf736 win32.S: Make calls to ffi_closure_SYSV_inner position-independent
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code.  This fixes one source of build
failures on target platforms that do not allow text relocations.
2014-03-21 10:57:06 -07:00
Anthony Green 28fb197079 Merge pull request #107 from rvandermeulen/msvcc
Various compatibility fixes and improvements to msvcc.sh.
2014-03-18 12:19:36 -04:00
Ryan VanderMeulen c3dd0a1a02 Various compatibility fixes and improvements to msvcc.sh.
* Don't try to mix incompatible optimization flags in debug builds.
* Workaround ax_cc_maxopt.m4 not supporting MSVC and change -O3 to -O2.
* Fix MSVC warning by properly passing linker flags to compiler.
* Make msvcc.sh return 1 if invalid command line options are used rather than silently eating them.
* Add more comments.
2014-03-18 12:09:45 -04:00
Anthony Green c697472fcc Merge pull request #102 from joshtriplett/test-generic
Add ABIs to the test matrix; unify many bits of the testsuite
2014-03-17 00:32:42 -04:00
Josh Triplett e48918ecf8 testsuite: Add ABIs to the test matrix; unify tests across ABIs
This eliminates all the *_win32.c tests in favor of the tests they were
branched from, and expands test coverage to run many more tests on
stdcall, thiscall, and fastcall.

This same mechanism also supports testing any other target that has
multiple ABIs.
2014-03-16 20:39:12 -07:00
Josh Triplett 4d4d368e5a testsuite: Replace ffitestcxx.h with ffitest.h
ffitest.h contains a superset of the functionality of ffitestcxx.h;
make the C++ tests include ffitest.h instead, and remove ffitestcxx.h.
2014-03-16 20:39:06 -07:00
Josh Triplett 3f97cf3413 testsuite: Unify the C and C++ testsuites
These two testsuites differ only in the source file glob and a couple of
additional compiler options; unify the remaining bits.
2014-03-16 20:34:46 -07:00
Josh Triplett 0d9cce8edb testsuite: ffitest.h: Parenthesize the CHECK macro 2014-03-16 20:34:46 -07:00
Josh Triplett 5695ec1444 testsuite: Factor out a function to run a matrix of tests
This commons up code from libffi.call/call.exp and
libffi.special/special.exp, unifies the optimization option matrix
between the two, and makes it easier to add more axes to the matrix
in the future.
2014-03-16 20:34:46 -07:00
Josh Triplett dfdb02cc86 testsuite: Introduce a __THISCALL__ compiler-specific macro 2014-03-16 20:34:41 -07:00
Anthony Green 83fd2bce04 Merge pull request #99 from joshtriplett/gitignore
.gitignore: Ignore more generated files
2014-03-16 22:03:29 -04:00
Anthony Green 3658a0700a Merge pull request #100 from rvandermeulen/bug-756740
Change double quotes in Makefile.am to single quotes.
2014-03-16 21:37:42 -04:00
Ryan VanderMeulen 46c5d3c30f Change double quotes in Makefile.am to single quotes.
This was originally done in PR #84, except the change was made to Makefile.in instead of Makefile.am and was therefore reverted the next time the files were regenerated.
2014-03-16 21:16:08 -04:00
Josh Triplett 06ff924215 .gitignore: Ignore more generated files
The build process generates doc/libffi.info and fficonfig.h.in, so add
them to .gitignore.
2014-03-16 16:19:46 -07:00
Josh Triplett bad8948346 testsuite: Introduce a __STDCALL__ compiler-specific macro
Several tests want to use stdcall, which differs in syntax by compiler,
so introduce a macro for it in ffitest.h.
2014-03-16 15:27:07 -07:00
Josh Triplett 98a793fa36 testsuite: Common up the ifdef blocks for compiler-specific macros 2014-03-16 15:21:57 -07:00
Anthony Green d948d0a729 Merge pull request #98 from joshtriplett/unconfigure.host
Merge configure.host into configure.ac
2014-03-16 10:53:48 -04:00
Josh Triplett a86bd318e2 Merge configure.host into configure.ac
configure.host only has a single entry, and shows no signs of needing
more added.
2014-03-16 07:05:28 -07:00
Anthony Green b61b472bd0 Update version to 3.1-rc0. Clean up README. 2014-03-16 09:45:55 -04:00
Anthony Green 7a64e7dbba Merge pull request #97 from joshtriplett/remove-more-generated-files
Remove more generated files
2014-03-16 09:39:08 -04:00
Anthony Green 11a5c5c39f Merge pull request #96 from joshtriplett/sawing-changelogs
Generate ChangeLog from git in make dist; remove it from version control
2014-03-16 09:38:47 -04:00
Josh Triplett eef2e02a13 doc: Remove autogenerated info file and stamp 2014-03-16 06:26:03 -07:00
Josh Triplett 9fb403d3c5 fficonfig.h.in: Remove, configure generates it 2014-03-16 06:25:52 -07:00
Josh Triplett 1c68c07217 Generate ChangeLog from git in make dist
Archive the existing ChangeLog to ChangeLog.libffi-3.1
2014-03-16 06:16:20 -07:00
Josh Triplett c65ed55e65 ChangeLog.v1: Fix typo in explanatory header. 2014-03-16 06:14:56 -07:00
Anthony Green 9a62a21f5c Add missing ChangeLog entry. Clean up some entries. 2014-03-16 09:03:57 -04:00
Anthony Green 9bc704c58c Merge pull request #95 from joshtriplett/news
README: Update news for 3.0.14
2014-03-16 08:41:00 -04:00
Josh Triplett e892e581d1 README: Update news for 3.0.14 2014-03-16 05:39:23 -07:00