-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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 objc sections such as __objc_data #10662
Comments
Why do you think debug/macho only supports 64-bit segments?
|
Checkout the struct segment_command and segment_command_64 on apple documentation page: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/MachORuntime/index.html#//apple_ref/doc/uid/20001298-89026 The size of the fields declared in the go struct SegmentHeader match segment_command_64 but are wrong is you read a segment_command (from a 32 bits binary) |
That's because the package will automatically translate the struct
so that portable code only need to handle one type that is big
enough to hold both kinds of segment headers.
http://golang.org/src/debug/macho/file.go#L317
|
I completely missed this part :) ! Renaming to "no support for objc sections" |
Could you please elaborate what do you expect for objc support?
|
I want to add ability to parse objc class, method, category and prototypes |
That's definitely out of scope for debug/macho.
|
Please elaborate. Why not add support to parse objc ? What is the scope of debug/macho ? |
The main reason debug/macho exists is because of cmd/cgo
needs it to read the section contents. Interpreting the contents
of sections is generally out-of-scope for that package (unless
interpreting the content helps accessing other information in
the file, for example, symtab)
Parsing the objc stuff doesn't need to be in the standard library,
it's perfectly fine for a go-gettable package.
|
No description provided.
The text was updated successfully, but these errors were encountered: