Bug 842762 - objdump should support Mach-O binaries
Summary: objdump should support Mach-O binaries
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-24 14:25 UTC by Karel Klíč
Modified: 2013-03-03 23:03 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-02 10:01:04 UTC
Type: Bug
Embargoed:


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

Description Karel Klíč 2012-07-24 14:25:10 UTC
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 10:00:15 UTC
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.