Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.



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

References: 
 >32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary. (From: "Paul Surma" <email@hidden>)
 >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: Chris Sarcone <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.