Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
- Subject: Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
- From: Duane Murphy <email@hidden>
- Date: Wed, 23 Sep 2009 16:42:49 -0700
Everyone has had to go through this as the 64-bit compiler as different layout rules for data structures. The layout rules are well documented in the 32/64-bit transition guide from Apple.
When we had to go through this, I wrote a simple command line tool that would print the size and offsets of the data structures that were shared between 32 and 64-bit models. We compile the the program for both 64-bit and 32-bit models. Then use the arch command to run the program in both architectures and compare the output. Adjust as necessary and try again.
As a bonus, the program now does some 45 different data structures and combined with a script is used during builds to make sure that changes don't cause incompatibility problems.
On Sep 23, 2009, at 4:06 PM, Chris Sarcone wrote: 2 – Is it possible for a 64 bit user space app to talk to a 32 bit (IOUserClient subclass) driver? Note: we have control over our custom method signatures, but methods inherited from the IOUserClient seem to change their signature (i.e. stack frame layout) based on the data model it’s compiled for…
Yes, it is possible. Apple's own apps and user clients do this.
...Duane
ps Don't forget your on disk data structures. If they are not strings, they will have similar problems.
|
Attachment:
PGP.sig
Description: PGP signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden