|
e58e22b2
|
2023-02-02T07:02:53
|
|
From Dave Anglin:
A couple of years ago the 32-bit hppa targets were converted from using a trampoline executed on the stack to the function descriptor technique used by ia64. This is more efficient and avoids having to have an executable stack. However, function pointers on 32-bit need the PLABEL bit set in the pointer. It distinguishes between pointers that point directly to the executable code and pointer that point to a function descriptor. We need the later for libffi. But as a result, it is not possible to convert using casts data pointers to function pointers.
The solution at the time was to set the PLABEL bit in hppa closure pointers using FFI_CLOSURE_PTR. However, I realized recently that this was a bad choice. Packages like python-cffi allocate their own closure pointers, so this isn't going to work well there.
A better solution is to leave closure pointers unchanged and only set the PLABEL bit in pointers used to point to executable code.
The attached patch drops the FFI_CLOSURE_PTR and FFI_RESTORE_PTR defines. This allows some cleanup in the hppa closure routines. The FFI_FN define is now used to set the PLABEL bit on hppa. ffi_closure_alloc is modified to set the PLABEL bit in the value set in *code.
I also added a FFI_CL define to convert a function pointer to a closure pointer. It is only used in one test case.
|
|
baa6bbbc
|
2023-02-02T06:59:46
|
|
Add HPPA64 support
|
|
e70dd1aa
|
2023-02-02T11:44:13
|
|
libffi: Fix X86 32b Darwin build and EH frames. (#757)
This addresses a number of issues in the X86 Darwin 32b port for libffi.
1. The pic symbol stubs are weak definitions; the correct section placement
for these depends on the linker version in use. We do not have access
to that information, but we can use the target OS version (assumes that
the user has installed the latest version of xcode available).
When a coalesced section is in use (OS versions earlier than Darwin12 /
OSX 10.8), its name must differ from __TEXT,__text since otherwise that
would correspond to altering the attributes of the .text section (which
produces a diagnostic from the assembler).
Here we use __TEXT, __textcoal_nt for this which is what GCC emits for
these stubs.
For later versions than Darwin 12 (OS X 10.8) we can place the stubs in
the .text section (if we do not we get a diagnostic from clang -cc1as
saying that the use of coalesced sections for this is deprecated).
2. The EH frame is specified manually, since there is no support for .cfi_
directives in 'cctools' assemblers. The implementation needs to provide
offsets for CFA advance, code size and to the CIE as signed values
rather than relocations. However the cctools assembler will produce a
relocation for expressions like ' .long Lxx-Lyy' which then leads to a
link-time error. We correct this by forming the offset values using
' .set' directives and then assigning the results of them.
3. The register numbering used by m32 X86 Darwin EH frames is not the same
as the DWARF debug numbering (the Frame and Stack pointer numbers are
swapped).
4. The FDE address encoding used by the system tools is '0x10' (PCrel + abs)
where the value provided was PCrel + sdata4.
5. GCC does not use compact unwind at present, and it was not implemented
until Darwin10 / OSX 10.6. There were some issues with function location
in 10.6 so that the solution here suppresses emitting the compact unwind
section until Darwin11 / OSX 10.7.
|
|
7effe999
|
2023-02-02T11:42:46
|
|
Darwin: Search for both shared and convenience libraries in each path. (#761)
For several Darwin linker versions, the default behaviour is to first traverse
the set of library paths, looking for shared libraries, and then a second time
looking for archives.
This means that if the library is configured --disable-shared the installed
system version /usr/lib/libffi.dylib will be found before the archive under
test.
Using the linker option '-search-paths-first' alters the strategy to search each
path for dylib and then archive before moving on to the next.
|
|
ebbc5e14
|
2023-02-02T11:40:17
|
|
Fix signed vs unsigned comparison (#765)
As reported by -Wsign-compare. In the case of getting the result of
comparing the result of sysconf (_SC_PAGESIZE) to other value, this also
correctly handles edge cases where the above fails and returns -1.
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
|
|
7611bb4c
|
2023-01-08T09:01:00
|
|
Use checkout@v3, with nodejs 16
|
|
3a8bb6bb
|
2023-01-08T21:56:34
|
|
fix typo (#758)
`mingW` -> `MinGW`
|
|
00116b6d
|
2022-12-05T03:20:09
|
|
arm/sysv: reverted clang VFP mitigation (#747)
Since commit e3d2812ce43940aacae5bab2d0e965278cb1e7ea,
seperate instructions were used when compiling under clang,
as clang didn't allow the directives at the time. This mitigation
now causes compilation to fail under clang 10, as described by
https://github.com/libffi/libffi/issues/607. Now that
clang supports the LDC and SDC instructions, this mitigation
has been reverted.
Co-authored-by: Brett Warren <brett.warren@arm.com>
|
|
c50c16d0
|
2022-11-20T12:20:40
|
|
Fix large struct passing on PA-RISC
|
|
c6dc125a
|
2022-10-25T10:28:19
|
|
Add missing test cases
|
|
2b2f61f6
|
2022-10-24T20:39:04
|
|
Small build cleanup (#743)
* configure.ac: Remove some unused checks
* Fix FFI_API definition
When doing a static build dllimport/dllexport should be disabled. It was
also using 2 different macros FFI_BUILDING_DLL and FFI_BUILDING for no
reason.
|
|
f24180be
|
2022-10-23T20:17:29
|
|
Update to version 3.4.4
|
|
848052fa
|
2022-10-23T11:25:10
|
|
More aarch64 fixes
|
|
af0f14cd
|
2022-10-24T04:08:10
|
|
Fix types of temporary variables in aarch64 extend_integer_type (#745)
Fixes truncated values in weston-info output.
|
|
f7233db2
|
2022-10-17T17:26:17
|
|
typos (#742)
|
|
45e49295
|
2022-10-16T12:41:56
|
|
Add 32-bit cygwin test
|
|
93cfb655
|
2022-10-10T14:32:35
|
|
Correction for older compilers
|
|
77a0fb82
|
2022-10-10T17:59:04
|
|
Flush output before aborting (#740)
Co-authored-by: Andreas Schwab <schwab@suse.de>
|
|
3874fd98
|
2022-10-10T17:58:48
|
|
Fix strict aliasing problem in aarch64 ffi_call (#739)
The assignment a = &dest in ffi_call_int may be moved after the call to
extend_integer_type because that function accesses the assigned value with
a different type.
Co-authored-by: Andreas Schwab <schwab@suse.de>
|
|
4b0c358e
|
2022-10-10T17:57:47
|
|
riscv: make copies of structs passed by reference (#738)
Co-authored-by: Andreas Schwab <schwab@suse.de>
|
|
c163d93a
|
2022-10-08T18:35:38
|
|
Add gcc-12 testing for aarch64 linux
|
|
62fd1f21
|
2022-10-02T13:03:37
|
|
Tweak quotes
|
|
e1d1b094
|
2022-09-28T10:16:45
|
|
Add .
|
|
b45f6894
|
2022-09-28T10:16:01
|
|
Update README for 3.4.4.
|
|
817a43fb
|
2022-09-28T09:05:45
|
|
Revert to previous cfi check. (#735)
|
|
963c4a96
|
2022-09-27T22:05:42
|
|
Remove nested comments
|
|
e9e44157
|
2022-09-27T21:25:30
|
|
Don't tweak path
|
|
4594dcc9
|
2022-09-27T21:05:26
|
|
Fix find
|
|
fe68a7b9
|
2022-09-27T20:29:17
|
|
Locate tools
|
|
cfb3f4c2
|
2022-09-27T20:13:42
|
|
Use cross tools for Windows
|
|
ae544e00
|
2022-09-27T18:23:06
|
|
Fix shell
|
|
b8d849bd
|
2022-09-27T17:58:31
|
|
Find ms tools
|
|
9785eee0
|
2022-09-27T17:39:44
|
|
32- and 64-bit Windows
|
|
1421717e
|
2022-09-27T08:13:17
|
|
Add "lto" to triple to identify lto builds
|
|
425acd4c
|
2022-09-27T07:57:37
|
|
Try aarch64 linux with -flto
|
|
c4261a05
|
2022-09-26T16:45:00
|
|
Show compiler version
|
|
a1467200
|
2022-09-26T11:41:48
|
|
Never link pthread for android
|
|
5ce26a0e
|
2022-09-26T13:43:40
|
|
CI: add Android builds (#732)
|
|
55bcc477
|
2022-09-24T22:03:52
|
|
Test idea borrowed from cpython
|
|
a2473cde
|
2022-09-24T21:41:02
|
|
or1k: All struct args are passed in memory
|
|
f93224d3
|
2022-09-24T21:38:57
|
|
moxie: All struct args are passed in memory
|
|
e79f1948
|
2022-09-24T17:11:30
|
|
Add test case transcribed from cpython
|
|
ab960387
|
2022-09-19T19:42:35
|
|
Set host triplet for native builds
|
|
a6fc8165
|
2022-09-19T19:25:09
|
|
Update job names
|
|
6b7fb6ce
|
2022-09-19T18:23:42
|
|
Give better names to CI workflows
|
|
f0675ab7
|
2022-09-19T17:30:51
|
|
Update version to 3.4.4-experimental
|
|
e3eaa609
|
2022-09-19T23:26:59
|
|
Suppress error console output duing configure in case not an ELF file (#729)
On Cygwin, MSYS and MinGW readelf is available, but files generated are no
ELF files. This results in an Error output on console:
'checking whether .eh_frame section should be read-only... readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
yes'
With this patch the error output is suppressed resulting in only
'checking whether .eh_frame section should be read-only... yes'
Setting of related variables is not changed.
Co-authored-by: Hannes Müller <>
|
|
84817695
|
2022-09-19T13:31:46
|
|
Fix typo
|
|
53338d2b
|
2022-09-19T13:07:50
|
|
Update version
|
|
0bd41b75
|
2022-09-19T12:26:05
|
|
Update libtool version
|
|
9b1dd8f2
|
2022-09-19T12:22:04
|
|
Update version to 3.4.3
|
|
0a769ccc
|
2022-09-19T08:17:15
|
|
Update release dates
|
|
f26b56e1
|
2022-09-19T08:15:22
|
|
Add new files for distribution
|
|
b801b54b
|
2022-09-19T06:49:32
|
|
Mention AIX with GCC
|
|
ff34df23
|
2022-09-19T06:45:19
|
|
Update comment about platform support
|
|
598ea692
|
2022-09-19T06:43:41
|
|
Clean ups, preparing for new release
|
|
fc6b9390
|
2022-09-19T06:42:29
|
|
Standardize temp exec file creation
|
|
4c2984c4
|
2022-09-18T15:06:57
|
|
Handle win32 ABIs for struct return
|
|
b05dc51b
|
2022-09-18T13:03:10
|
|
Debug x86
|
|
cafdb837
|
2022-09-18T12:05:12
|
|
Revert
|
|
acf0ce9e
|
2022-09-18T11:04:54
|
|
Add test case
|
|
b49308ea
|
2022-09-18T08:26:23
|
|
Add missing ABI_ATTR
|
|
735e7be4
|
2022-09-18T08:21:34
|
|
X86 is never defined.
|
|
ee22ecbd
|
2022-09-18T01:56:25
|
|
Add MSYS configuration files (#728)
* Add MSYS configuration files
MSYS behaves very similiar to Cygwin, e.g. also __CYGWIN__ is defined.
Now 'make check' passes on MSYS without extra patches.
* Fix warning extra tokens at end of #endif in closures.c
Extra tokens converted into a comment. Also nearby indentations corrected.
* Fix missing prototype warning mkostemp() on Cygwin
Cygwin requires also _GNU_SOURCE to be defined to enable mkostemp() prototype.
* Fix warning label ‘out’ defined but not used in ffi functions
Define same preprocessor conditions for goto and label visibility.
* Fix warning label ‘out’ defined but not used and related indentations.
Define same preprocessor conditions for goto and label visibility. Correct also
related indentations.
Co-authored-by: Hannes Müller <>
|
|
5e010474
|
2022-09-15T16:57:59
|
|
Fix test case for 64-bit mingw
|
|
305cde79
|
2022-09-15T15:50:35
|
|
Passes on 64bit mingw
|
|
05785caf
|
2022-09-15T15:18:09
|
|
Fix arg alignment for STDCALL
|
|
98d4ad65
|
2022-09-15T09:42:53
|
|
Fix test headers
|
|
2abf00a6
|
2022-09-15T08:25:39
|
|
Tweak msys2 tools again
|
|
d1b31536
|
2022-09-15T08:16:26
|
|
Fix msys2 tool selection
|
|
d352ed36
|
2022-09-15T08:10:53
|
|
Build 32- and 64-bit msys2
|
|
4d0a0384
|
2022-09-15T07:58:26
|
|
msvc requires the printf change, not mingw
|
|
a509abf6
|
2022-09-15T06:45:00
|
|
Install unzip
|
|
950ed4a7
|
2022-09-15T06:33:14
|
|
Don't make msys2 default shell
|
|
5d02c0cc
|
2022-09-15T06:28:23
|
|
Try msys2
|
|
64a78fa7
|
2022-09-15T06:08:30
|
|
Try new path
|
|
77fdeae8
|
2022-09-15T01:37:31
|
|
Find mingw32
|
|
bb4e7278
|
2022-09-15T01:28:58
|
|
DEbug
|
|
7443b421
|
2022-09-14T23:17:21
|
|
Try new shell
|
|
2ebc36f4
|
2022-09-14T23:11:52
|
|
Fix indentation
|
|
3740b243
|
2022-09-14T23:10:43
|
|
set mingw32 path
|
|
7bf23f89
|
2022-09-14T23:04:42
|
|
Rename job
|
|
ce5b2208
|
2022-09-14T23:02:32
|
|
Fix mingw32 github actions
|
|
317c9b6a
|
2022-09-14T22:54:10
|
|
Add mingw32 testing
|
|
19e8354f
|
2022-09-14T07:36:06
|
|
Fix test case
|
|
4932f351
|
2022-09-14T07:08:06
|
|
Improve test case
|
|
819b01ce
|
2022-09-14T07:07:15
|
|
Add test case
|
|
b577a5b8
|
2022-09-12T10:23:59
|
|
Mention Cygwin static trampoline support.
|
|
4b54a647
|
2022-09-12T09:02:08
|
|
Fix limits.h inclusion for cygwin
|
|
a1130f37
|
2022-09-12T08:53:06
|
|
Add static trampoline support for Cygwin
|
|
26cc9a6c
|
2022-09-10T20:36:45
|
|
Remove stray }}
|
|
07818488
|
2022-09-10T11:45:28
|
|
Update rlgl usage (switch from player ID to labels)
|
|
6e7caacb
|
2022-09-10T10:31:37
|
|
Label rlgl reports
|
|
d9a19e21
|
2022-09-07T07:58:03
|
|
The right kind of quotes
|
|
2b264496
|
2022-09-07T07:57:26
|
|
More quotes
|
|
eb9eb1f6
|
2022-09-07T07:49:51
|
|
Fix random build dir
|
|
ea124a99
|
2022-09-07T07:21:21
|
|
Remove bogus sparc compiler flag
|
|
cca77833
|
2022-09-07T07:20:59
|
|
Fix typo
|
|
8ee64076
|
2022-09-07T07:14:13
|
|
Fix typo
|
|
08693502
|
2022-09-07T07:12:10
|
|
Set CC and CXX for GCC compile farm builds
|