[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11131] New: Add updelfhdr
From: |
hjl dot tools at gmail dot com |
Subject: |
[Bug binutils/11131] New: Add updelfhdr |
Date: |
4 Jan 2010 18:46:28 -0000 |
I need to update machine type in ELF header. Objcopy doesn't work.
On Linux/x86-64, I got
address@hidden binutils]$ objcopy -O elf64-l1om /bin/ls ls
objcopy: Warning: Output file cannot represent architecture `i386:x86-64'
and no output was written. I wrote updelfhdr:
http://sourceware.org/ml/binutils/2009-12/msg00236.html
and got
address@hidden binutils]$ cp /bin/ls /tmp/
address@hidden binutils]$ ./updelfhdr --output-mach L1OM /tmp/ls
address@hidden binutils]$ readelf -h /tmp/ls
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Intel L1OM
Version: 0x1
Entry point address: 0x4026b0
Start of program headers: 64 (bytes into file)
Start of section headers: 111976 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 8
Size of section headers: 64 (bytes)
Number of section headers: 32
Section header string table index: 31
address@hidden binutils]$
--
Summary: Add updelfhdr
Product: binutils
Version: 2.21 (HEAD)
Status: NEW
Severity: enhancement
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: hjl dot tools at gmail dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11131
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/11131] New: Add updelfhdr,
hjl dot tools at gmail dot com <=