This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: your patch broke darwin libffi
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Fri, 18 Jan 2002 17:35:04 +0100
- Subject: Re: your patch broke darwin libffi
- Organization: zero
- References: <200201181604.LAA28052@makai.watson.ibm.com>
David Edelsohn wrote:
>
> Why doesn't Darwin ignore missing symbols? Doesn't it use lazy
> binding?
Don't know, at least it complains on all sort of symbols either missing
or duplicated. I don't see through the linker story on darwin.
>
> Throw a definition of _ffi_call_AIX in darwin.S. It will never be
> called because the ABI will never be set to AIX.
Something like this?
--- darwin.S.orig Fri Jan 18 17:22:40 2002
+++ darwin.S Fri Jan 18 17:28:36 2002
@@ -35,6 +35,12 @@
.text
.align 2
+.globl _ffi_call_AIX
+
+.text
+ .align 2
+_ffi_call_AIX:
+
.globl _ffi_call_DARWIN
.text
.align 2
I'm not experienced with asm. At least it builds and the ffitest spits this:
[titanium:objdir/powerpc-apple-darwin5.2/libffi] andreast% ./ffitest
709 return value tests run
long double return value tests ok!
2 vs 2
float arg tests ok!
strlen tests passed
double return value tests ok!
many arg tests ok!
1383096 promotion tests run
structure test 1 ok!
2.90522e-310
2.747e-321
4.55
5.66
structure test 2 ok!
246 246
structure test 3 ok!
structure test 4 ok!
Structure test 5 found GCC's structure passing bug.
Looks good. No surprises.
-----
Any things I do completely wrong?
Thanks for the advice.
Andreas