How to run macos universal built binary on 32 bit boot of macbook pro

I have lot of doubts using universal built binary. I didnt get required information about universal binary from google or documentation provided by macos on universal binary.
Here are the steps I followed:
1) I compiled my application selecting architectures i386 and x86_64 (from xcode).
2) I see application is built as fat binary which supports i386 and x86_64 (using file command).
TestApp: Mach-O universal binary with 2 architectures
TestApp (for architecture x86_64): Mach-O 64-bit executable x86_64
TestApp (for architecture i386): Mach-O executable i386
3) Now the problem is when I boot 32 bit kernel on macbook pro and try to execute my universal binary, it is behaving as 64 bit architecture application( sizeof(long) and sizeof(char *) is coming as 8 bytes).
For this I found a way how to run universal binary selecting architecture:
arch -i386 ./TestApp
This selects i386 architecture from fat binary and runs the application(sizeof(long) and sizeof(char *) is 4 bytes).
However, my requirement is I should run universal binary on i386 as i386 application without using arch command.
Are there any xcode settings to be made to make universal binary run as i386 application on 32 bit macos boot ??? Can we select architectural preferences for running universal binary application ??
Please help.
Regards,
Sumanth

This is the thing I am doing with my application:
ioctlBuff.pvInputBuffer = Address of some structure;
ioctlBuff.ulInputLength = sizeof(some structure);
ioctlBuff.pvOutputBuffer = pOutputBuffer;
ioctlBuff.ulOutputLength = dwOutputBufferLength;
and calling: ioctl((int)pDevIO->m_hDevice, dwIoctl,&ioctlBuff);
If I make sure driver is hit with the ioctl code I am calling(by maintaining sizeof third parameter in _IOWR('k', 0x854, typedef structure) to be same in driver and application), driver is getting hit with that ioctl code.
And here is the main issue:
now driver does:
copyfromuser(&sRdmBuffer, psIoBuffer->InputBuffer, psIoBuffer->InputLength), it fails to copy as InputBuffer passed by user space is 64 bit pointer!!
I conformed values i pass to copyfromuser are valid.
BUT I DONT SEE ANY OF THESE ISSUES IF I USE
arch -i386 ./TestApp
for my universal binary as i386 set of text code is picked for execution!
Thats why I wanted to load i386 arch of my universal binary. I dont want to use arch command.

Similar Messages

  • How do I get my apple tv icon to show on my macbook pro. I'm running mavercik

    how do I get my apple tv icon to show on my macbook pro. I'm running maverick.

    Thanks for the link Diesel. Not quite there yet. Software is all up to date to 6.0.2. Your link suggests I should have second or third gen apple tv. Not sure what generation Apple TV I have.  Don't believe its a really early model.  I have model MC572LL/A. But it has the latest update, so I would think it would connect.  Still no apple tv icon on my macbook pro.

  • How can i get or download the apple hardware test for a macbook pro made in 2012 running Mavericks 10.9.3

    Does anyone know how can i get or download the apple hardware test for a macbook pro made in 2012 running Mavericks 10.9.3. Thanks.

    Sean and Andy -
    I have to agree with Andy here. I am having the same problem on a mid 2010 MBP (6,2). I have already read the AHT info provided by Sean's link, and they are less than helpful. I'm sure they will be helpful to those who find that they work, but they are confusing if this is not the case. For example, my MBP(6,2) came with ONE (not two) installation disks, so the instructions don't work for me. Another issue is the instructions confound the descriptions related to the MBP, the original (delivered) software (OS X version), and the current installed OS X upgrade software.
    So here's what does NOT work for me... 
         (A) I cannot install 'Disk 2', since I never received this with my original (new) purchase in mid 2010.
         (B) I have checked my firmware versions and they are all up to date, as per Apple's information.
         (C) As suggested in another thread, I looked for /Library/Core Services/.diagnostics and it was NOT present. I followed his instructions, downloaded the correct (I believe) dmg, and installed it. It is in the correct place, and I can see all the invisible files using Pathfinder.
         (D) When I re-start holding down the D key (immediately), it just goes through the normal boot routine; no evidence of AHT.
         (E.1) When I re-start holding down OPT-D, I get a spinning globe, and then it prompts me for a network (wi-fi) connection.
         (E.2) For some unknown reason, the prompt identifies between 2 and 5 of my --neighbors'--  routers, but does not show mine. (??!!)
         (E.3) The routers are listed alphabetically; however, my router SHOULD be at the top of the list by this criterion, but it is nowhere to be seen.
         (E.4) The 'internet recovery' process then allows me to enter a network name AND password. I do this, for my current wi-fi router, and the process rejects it as an incorrect login ID. It is NOT an incorrect login ID! 
    So, now asking Sean and Andy (or anyone else) for further suggestions... ???  As Andy suggested, many people ask questions here because they have -already- worked through the 'official' recommendations, and have found them to be inadequate.
    Any advice would be appreciated!  TIA.
    Ed

  • How can I open Adobe Bridge CS6 in high resolution on my MacBook Pro Retina display?

    How can I open Adobe Bridge CS6 in high resolution on my MacBook Pro Retina display? When I click Get Info, the "Open in Low Resolution" box is marked and locked. How can I unmark this box? I currently run 10.9.1. I can open Adobe Photoshop CS6 in high resolution without any problem. Any advice would be much appreciated. Thanks.

    There is no such thing. In CS6 only PS itself is Retina compatible. You would have to use CC for full Retina support.
    Mylenium

  • I can not boot my MacBook Pro. How do I get and save the data that is not backed up??

    I can not boot my MacBook Pro running on Lion 10.7.4. I pressed control, comment P and R keys and O got to the disk utility, then I tried to repair disk and it can not be repaired. I get a message that tells me to back up as much data as possible ?. But if I can not open the computer how can I save my data??
    I have a back up until 2 weeks ago on time machine. but the work of the last 2 weeks is extremely important how can I get it??
    If I use m time machine backup do I loose the additional data of the last two weeks!,
    Please help.. It's a huge amount of work that I have done and can not loose it

    If it were me, I'd get a new hard drive or SSD and put it in an external enclosure. Boot into the recovery partition, format the new drive (not the old one) and install the OS to it. Shut down the Mac, open it up, and swap the drives. You may be able to read your data from the old one externally if you're lucky. If you're very lucky you may be able to use Migration Assistant to move all your stuff to the new drive.
    Look at ifixit.com for the exact procedure to get to the drive on your model. If it's a unibody it's pretty simple.
    http://www.amazon.com/Sabrent-2-5-Inch-Aluminum-Enclosure-EC-TB4P/dp/B005EIGUD4/ ref=sr_1_3?ie=UTF8&qid=1392154588&sr=8-3&keywords=2.5+enclosure

  • How will i increase the shared memory of the graphic card of macbook pro 13-inch, early 2011 from 4gb memory?

    how will i increase the shared memory of the graphic card of macbook pro 13-inch, early 2011 from 4gb memory?

    The current version of Mavericks is 10.9.4. To update yours download and install OS X Mavericks 10.9.4 Update (Combo).
    You can upgrade RAM to the maximum your model will support. That would be:
    Maximum Memory
    16 GB (Actual) 8 GB (Apple)
    Memory Slots
    2 - 204-pin PC-10600 (1333 MHz) DDR3 SO-DIMM
    About OS X Memory Management and Usage
    Using Activity Monitor to read System Memory & determine how much RAM is used
    OS X Mavericks- About Activity Monitor
    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

  • When I try to boot my macbook pro the startup manager doesn't show any drives. How can I solve this issue?

    when I try to boot my macbook pro the startup manager doesn't show any drives. How can I solve this issue?

    Please confirm what version of OS X you are running - I doubt it is the ancient OS 10.1 !

  • How do i use the headphone jack as an input on a macbook pro 9,2.... the option just isn't in the sound app.

    how do i use the headphone jack as an input on a macbook pro 9,2.... the option just isn't in the sound app.
    all i have is the internal mic option, can anyone help?
    thanks

    You should also ask this in the MacBook Pro forum. This is the forum for the white and black plastic MacBooks that were discontinued in 2010. You should also post this question there to increase your chances of getting an answer.
    https://discussions.apple.com/community/notebooks/macbook_pro

  • How can I transfer my email accounts and emails from my old macbook pro with ML to my new macbook pro with ML

    How can I transfer my email accounts and emails from my old macbook pro with ML to my new macbook pro with ML

    Do you have your system backed up to Time Machine? If so, you can open your user Library and copy your Mail folder from Time Machine to your Desktop on your new machine; then copy THAT folder to your new machine's user Library.
    To get to your user Library, open Finder and Go and press the Option key. Library will show up. Click on it to get into your user Library. Now go into Time Machine and you should see your user Library for Time Machine. Restore the Mail folder to your Desktop.

  • How do I use AirPort Extreme to be able print from my MacBook Pro AND a PC. If I connect printer into AirPort, I can only print on laptop. If printer is connected to PC hard drive, I can only print on desk top. How do I configure this to make both print?

    How do I use AirPort Extreme to be able print from my MacBook Pro AND a PC. If I connect printer into AirPort, I can only print on laptop. If printer is connected to PC hard drive, I can only print on desk top. How do I configure this to make both print?

    If you have not already done so, your chances will really improve if you....
    1) Connect the printer to the USB port on the AirPort Extreme
    2) Download and install Bonjour Print Services for Windows on the PC

  • I was on a free dictionary website and it asked me if it would like to send me push notifications and i allowed it but i don't want them anymore...how do i get rid of that? I'm using my macbook pro by the way

    I was on a free dictionary website and it asked me if it would like to send me push notifications and i allowed it but i don't want them anymore...how do i get rid of that? I'm using my macbook pro by the way

    Go to the site and look for an unsubscribe link. Or, contact the site and ask them to stop.

  • How can I move my project from external hard drive to my macbook pro?

    How can I move my project from external hard drive to my macbook pro? every time I try to do some editing, the sequence is very slow, thanks in advance

    Try here...
    Setting-up a new Mac from an old one, its backups, or a PC

  • How can I get the old view of iCal back on my MacBook Pro and iPhone?

    How can I get the old view of iCal back on my MacBook Pro and iPhone?  The Mavrick version is crisp and clean but a colored dot is not the same as a highlighted word. I rely on my iCal on my MacBook Pro and iPhone 5 to help me track which of the 8 sites I visit for my job during the week - the color coding is (was key) to organizing and tracking meetings.  I hate the upgrade! 

    If purchased through the Mac App Store then it can be installed on up to five authorized CPUs. Otherwise, it's controlled by the license that came with the software.
    To install on another computer copy the downloaded installer application to the other computer.

  • How can I transfer files from my 2007 iMac to my new MacBook Pro?

    How can I transfer files from my 2007 iMac to my new MacBook Pro?  It cannot be does over wi-fi as my old computer is too old.  Please advise!

    Use a Thunderbolt to Ethernet or FireWire adapter.
    (95019)

  • How do I move large files from a Windows computer to my MacBook Pro? There are a lot of photos (tiffs

    How do I move large files from a Windows computer to my MacBook Pro? There are a lot of photos (tiffs, jpgs, some photoshopped files), iTunes library, word docs. Is there a particular type of external hard drive that can be used or am I limited to copying stuff onto z-drive and moving that way?

    If both computers are on the same network, you can share the files from the Windows host using SMB and mount the share on the Mac. Otherwise, the Mac should be able to read (not necessarily write) any storage device formatted in Windows.

Maybe you are looking for