[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/3171] New: efi-app-ia64 objcopy magic error
From: |
bibo dot mao at intel dot com |
Subject: |
[Bug binutils/3171] New: efi-app-ia64 objcopy magic error |
Date: |
5 Sep 2006 02:43:32 -0000 |
When converting ELF64 binary format into efi-app-ia64 format by objcopy
command, optional header magic number in efi-app-ia64 target file is wrong.
Originally its magic is 0x10b, it should be 0x20b.
In Portable Executable and Common Object File Format Specification, it says
that optional header magic number determines whether an image is a PE32 or
PE32+ executable, 0x10b represents PE32 and 0x20b represents PE32+.
On IA64 platform it should be PE32+ image but not PE32 image.
The following is patch for binutils-2.17, elilo package is tested with this
patch on IA64 platform, converted target file elilo bootloader can run in old
EFI bios, and also it can run in new EFI bios.
--- binutils-2.17/bfd/coffcode.h 2005-10-26 01:40:09.000000000 +0800
+++ binutils-2.17.new/bfd/coffcode.h 2006-09-05 02:19:48.000000000 +0800
@@ -3861,7 +3861,7 @@ coff_write_object_contents (bfd * abfd)
#if defined(IA64)
#define __A_MAGIC_SET__
- internal_a.magic = ZMAGIC;
+ internal_a.magic = PE32PMAGIC;
#endif /* IA64 */
#if defined(SPARC)
--
Summary: efi-app-ia64 objcopy magic error
Product: binutils
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: bibo dot mao at intel dot com
CC: bibo dot mao at intel dot com,bug-binutils at gnu dot
org
http://sourceware.org/bugzilla/show_bug.cgi?id=3171
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/3171] New: efi-app-ia64 objcopy magic error,
bibo dot mao at intel dot com <=