Skip to content
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

debug/macho: No support for fat archives/files #7250

Closed
rsesek opened this issue Feb 3, 2014 · 4 comments
Closed

debug/macho: No support for fat archives/files #7250

rsesek opened this issue Feb 3, 2014 · 4 comments

Comments

@rsesek
Copy link
Contributor

rsesek commented Feb 3, 2014

What steps will reproduce the problem?
The debug/macho package provides utilities for reading the headers and load commands of
Mach images, but it only supports thin binaries. On OS X, it's fairly common to produce
fat binaries that contain multiple MachO images for different architectures. Examples
include (i386 and x86_64) and (armv7, armv7s). I think the debug/macho package should
provide support for reading fat binaries as well.

https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html#//apple_ref/c/tag/fat_header

To preserve the existing API, two new types would probably be necessary:

FatFile and FatArch. FatFile would contain the magic and a slice of FatArchive.
FatArchive would include the fields from the fat_arch struct and also provide a way to
get a *macho.File object for that architecture.

What is the expected output?
N/A

What do you see instead?
N/A

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
OS X 10.9.1

Which version are you using?  (run 'go version')
go version go1.2 darwin/amd64

Please provide any additional information below.
@rsesek
Copy link
Contributor Author

rsesek commented Feb 3, 2014

Comment 1:

I'm going to work on a patch for this.

@davecheney
Copy link
Contributor

Comment 2:

Labels changed: added release-none, repo-main, os-macosx.

Status changed to Started.

@davecheney
Copy link
Contributor

Comment 3:

This issue was updated by revision 9515086.

LGTM=iant
R=golang-codereviews, gobot, dsymonds, iant
CC=golang-codereviews
https://golang.org/cl/61720044

@davecheney
Copy link
Contributor

Comment 4:

This issue was closed by revision 5bf35df.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants