Permalink
Browse files

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

  • Loading branch information...
1 parent 4e07ab7 commit d6f41e36e1786a7d8c3bb147354c3cb253078237 @shinh committed Jun 16, 2011
Showing with 18 additions and 1 deletion.
  1. +18 −1 README
View
19 README
@@ -33,7 +33,8 @@ To remove the entries, run the following command:
* How to try 32bit support
-% make clean all BITS=32
+% make clean
+% make all BITS=32
If you see permission errors like
@@ -46,6 +47,22 @@ addresses less than 0x10000.
Or, running ld-mac as a super user would also work.
+* How to run both 64bit Mach-O and 32bit Mach-O binaries
+
+% make both
+% ./binfmt_misc.sh start `pwd`/ld-mac.sh
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch i386 mach/hello.c -o hello32
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch x86_64 mach/hello.c -o hello64
+% /usr/i686-apple-darwin10/usr/bin/gcc -arch i386 -arch x86_64 mach/hello.c -o hello
+% ./hello32
+Hello, 32bit world!
+% ./hello64
+Hello, 64bit world!
+% ./hello
+Hello, 64bit world!
+% LD_MAC_BITS=32 ./hello
+Hello, 32bit world!
+
* Which programs should work
OK

0 comments on commit d6f41e3

Please sign in to comment.