Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update README to explain how to run both 32bit and 64bit Mach-O binaries

  • Loading branch information...
commit d6f41e36e1786a7d8c3bb147354c3cb253078237 1 parent 4e07ab7
Shinichiro Hamaji authored June 16, 2011

Showing 1 changed file with 18 additions and 1 deletion. Show diff stats Hide diff stats

  1. 19  README
19  README
@@ -33,7 +33,8 @@ To remove the entries, run the following command:
33 33
 
34 34
 * How to try 32bit support
35 35
 
36  
-% make clean all BITS=32
  36
+% make clean
  37
+% make all BITS=32
37 38
 
38 39
 If you see permission errors like
39 40
 
@@ -46,6 +47,22 @@ addresses less than 0x10000.
46 47
 
47 48
 Or, running ld-mac as a super user would also work.
48 49
 
  50
+* How to run both 64bit Mach-O and 32bit Mach-O binaries
  51
+
  52
+% make both
  53
+% ./binfmt_misc.sh start `pwd`/ld-mac.sh
  54
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch i386 mach/hello.c -o hello32
  55
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch x86_64 mach/hello.c -o hello64
  56
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch i386 -arch x86_64 mach/hello.c -o hello
  57
+% ./hello32
  58
+Hello, 32bit world!
  59
+% ./hello64
  60
+Hello, 64bit world!
  61
+% ./hello
  62
+Hello, 64bit world!
  63
+% LD_MAC_BITS=32 ./hello
  64
+Hello, 32bit world!
  65
+
49 66
 * Which programs should work
50 67
 
51 68
 OK

0 notes on commit d6f41e3

Please sign in to comment.
Something went wrong with that request. Please try again.