https://sourceware.org/bugzilla/show_bug.cgi?id=34886
Bug ID: 34886
Summary: Mach-O: objdump/nm refuse images with load commands
0x36-0x3a ("unknown load command 0x37", "file format
not recognized") though the commands lack LC_REQ_DYLD
Product: binutils
Version: 2.47
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: i at mi11ion dot io
Target Milestone: ---
Host: aarch64-apple-darwin
Created attachment 17205
--> https://sourceware.org/bugzilla/attachment.cgi?id=17205&action=edit
min.dylib (LC_FUNCTION_VARIANTS 0x37 at 0xbf0) and min-control.dylib (same
file, cmd fields set to 0x29)
Environment: GNU objdump (GNU Binutils) 2.47.20260726, Homebrew bottle binutils
2.47 on macOS 27.0 (arm64). bfd/mach-o.c is the same at binutils-2_47 and at
master 1c79f853160d.
Reproducer: the attached function-variants.tar.gz holds min.dylib (the arm64e
slice of macOS 27's /usr/lib/system/introspection/libdispatch.dylib with every
byte zeroed that the steps below do not need; 370768 bytes, 200 non-zero) and
min-control.dylib (min.dylib with the cmd fields at file offsets 0xbf0 and
0xc00 changed from 0x37 and 0x38 to 0x29; make-control.sh writes it).
objdump --dwarf=frames min.dylib min-control.dylib
Actual:
objdump: min.dylib: unknown load command 0x37
objdump: min.dylib: file format not recognized
min-control.dylib: file format mach-o-arm64
Contents of the .eh_frame section:
...
Exit status 1. The same happens with -h, -d and -P on any macOS 27 or iOS 27
binary holding LC_FUNCTION_VARIANTS (0x37), LC_FUNCTION_VARIANT_FIXUPS (0x38)
or LC_LAZY_LOAD_DYLIB_INFO (0x3a):
/usr/lib/system/introspection/libdispatch.dylib (0x37, both arm64e slices),
/System/Applications/Preview.app/Contents/MacOS/Preview and
/System/Library/Frameworks/ClassKit.framework/Versions/A/progressd (0x3a).
Expected: min.dylib is recognized as mach-o-arm64 and its .eh_frame is dumped
as for min-control.dylib; the two files hold the same __eh_frame bytes.
--
You are receiving this mail because:
You are on the CC list for the bug.