-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrecognized Mach-O magic #99
Comments
Looks like a bug to me. Could you send me the binaries used in both of the cases above? |
Files are attached. |
Forgot to mention I'm using macOS 10.13.5, if that matters. |
Thanks! I'll take a look at these tomorrow morning. Being on 10.13.5 shouldn't change anything -- |
Found the problem/one of the problems: fat Mach-Os expect to be aligned based on the I'll fix these issues now. |
Introduces `MachOFile#segment_alignment`, `SegmentCommand#guess_align`, and `Sections::MAX_SECT_ALIGN`. Closes #99.
#100 contains the WIP branch. |
BTW, If you want to parse the contents of an |
I'm maintaining homebrew tap for universal python and need to keep universal openssl as well. Several times I attempted and failed to to switch from using
lipo
toMachO::Tools.merge_machos
, but this time trying to figure out what I am doing wrong.With
lipo --create
everything works as expected:$ lipo -create /tmp/uopenssl-20180702-16887-vjpn5r/openssl-1.0.2o/build-i386/libcrypto.1.0.0.dylib /tmp/uopenssl-20180702-16887-vjpn5r/openssl-1.0.2o/build-x86_64/libcrypto.1.0.0.dylib -output /tmp/xyz.dylib $ lipo -info /tmp/xyz.dylib Architectures in the fat file: /tmp/xyz.dylib are: i386 x86_64 $ file /tmp/xyz.dylib /tmp/xyz.dylib: Mach-O universal binary with 2 architectures: [i386:Mach-O dynamically linked shared library i386] [x86_64] /tmp/xyz.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /tmp/xyz.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
and
$ file /tmp/zzz.a /tmp/zzz.a: Mach-O universal binary with 2 architectures: [i386:current ar archive random library] [x86_64] /tmp/zzz.a (for architecture i386): current ar archive random library /tmp/zzz.a (for architecture x86_64): current ar archive random library $ lipo -info /tmp/zzz.a Architectures in the fat file: /tmp/zzz.a are: i386 x86_64
When I launch
brew irb
:and
What am I doing wrong, or did I ran into some kind of bug?
The text was updated successfully, but these errors were encountered: