Bug 842762 - objdump should support Mach-O binaries
objdump should support Mach-O binaries
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nick Clifton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 10:25 EDT by Karel Klíč
Modified: 2013-03-03 18:03 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-02 06:01:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add mach-o support to x86 based binutils (1.49 KB, patch)
2012-08-02 06:00 EDT, Nick Clifton
no flags Details | Diff

  None (edit)
Description Karel Klíč 2012-07-24 10:25:10 EDT
Description of problem:
The objdump utility as compiled in Fedora cannot read Mac OS X binaries.

When working on a low-level stuff, one might need to investigate how things are done on other widely-used operating systems.  PE/COFF binaries can be investigated fine using objdump.   If Mach-O binaries are also viewable out of the box, developers would remain impressed by Fedora's versatility and first-class development support.

Version-Release number of selected component (if applicable):
binutils-2.22.52.0.3-1.fc18

Steps to Reproduce:
1. Download and unpack http://www.imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin11.4.0.tar.gz.
2. cd ImageMagick-6*/bin
3. objdump -x convert

Actual results:
$ objdump -x convert 

objdump: convert: File format not recognized


Expected results:
$ objdump -x convert 

convert:     file format mach-o-x86-64
convert
architecture: i386:x86-64, flags 0x00000012:
EXEC_P, HAS_SYMS
start address 0x0000000100000e20
<snip>

Additional info:
One could solve this request effortlessly by adding `--enable-targets=all` to %configure, but somewhat more limited selection would be appropriate to keep the size of maintained code reasonable.

The list of targets that are being compiled into bfd are selected in bfd/config.bfd based on the `--target` value given to the configure script.

Please consider extending bfd/config.bfd to include mach-o on {i[3-7]86,x86_64}-*-linux, or some other adjustment that adds the mach-o support.
Comment 1 Nick Clifton 2012-08-02 06:00:15 EDT
Created attachment 601915 [details]
Add mach-o support to x86 based binutils

Hi Karel,

  I have considered this request, but I am sorry to have to say that I just do not think that it is appropriate.  Anyone working with low level details of binary files should be able to build their own toolchain targeted at whichever formats they like.  Adding support for Mach-O binaries to the general binutils package is just going to increase the maintainence burden and probably confuse people who don't understand about the difference between displaying binaries and linking binaries.

  For the record I did create a patch that adds Mach-O support to x86 based binutls rpms.  I have uploaded it to this bug report in case it useful to you.

Cheers
  Nick

Note You need to log in before you can comment on or make changes to this bug.