[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/32383] New: using objcopy on Mac OSX ARM64
From: |
ralph.lessmann at hidglobal dot com |
Subject: |
[Bug binutils/32383] New: using objcopy on Mac OSX ARM64 |
Date: |
Thu, 21 Nov 2024 14:06:02 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32383
Bug ID: 32383
Summary: using objcopy on Mac OSX ARM64
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: ralph.lessmann at hidglobal dot com
Target Milestone: ---
I am trying to use object copy to embed an segment into a library using the
following command line:
objcopy -B aarch64 -I binary -O mach-o-arm64 ./data.bin ./data.o
The generated object file data.o cannot be used. When inspecting the file with
objdump, I see the following mach-o header:
architecture: aarch64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
MACH-O header:
magic: 0xfeedface
cputype: 0x100000c (ARM64)
cpusubtype: 0 (ARM64_ALL)
filetype: 0x1
ncmds: 0x3
sizeocmds: 0xe4
flags: 0
version: 1
It looks like the magic number and the version is wrong for mach-o-arm64. When
I compare it with a linkable object file I got:
architecture: aarch64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
MACH-O header:
magic: 0xfeedfacf
cputype: 0x100000c (ARM64)
cpusubtype: 0 (ARM64_ALL)
filetype: 0x1
ncmds: 0x5
sizeocmds: 0x448
flags: 0x2000
version: 2
And wikipidia tells: the magic number for 32-bit code is 0xfeedface while the
magic number for 64-bit architectures is 0xfeedfacf
I patched the objcopy source code for testing, but still beeing unable to link
the generated object file.
Not sure if this is a case of not supported or a bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/32383] New: using objcopy on Mac OSX ARM64,
ralph.lessmann at hidglobal dot com <=