This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Add updelfhdr
- From: Tristan Gingold <gingold at adacore dot com>
- To: H.J. Lu <hjl dot tools at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Mon, 4 Jan 2010 15:27:49 +0100
- Subject: Re: PATCH: Add updelfhdr
- References: <20091217184650.GA29177@lucon.org> <4B3CB946.7000904@redhat.com> <6dc9ffc80912310716x2945434aie199099aa3b033cc@mail.gmail.com>
On Dec 31, 2009, at 4:16 PM, H.J. Lu wrote:
> On Thu, Dec 31, 2009 at 6:46 AM, Nick Clifton <nickc@redhat.com> wrote:
>> Hi H.J.
>>
>>> I wrote a program to update ELF header. Currently it can change
>>> ELF machine type between L1OM and X86-64.
>>
>> I have to ask why make a separate program when you have just as easily added
>> this functionality to objcopy ?
>>
>
> For the same reason that we have both readelf and objdump?
Readelf was initially written to double check BFD handling of ELF files, not for performance reasons.
(at least according to the comments in readelf.c)
> objcopy is overkill.
> It reads input into internal memory and write them out. My program updates files
> in place. It doesn't read in the whole file into memory.
It this performance critical ?
I think it is dubious to have ELF specific tools in binutils. Readelf being the exception, binutils tools
are expected to work on any file formats.
Just my opinion,
Tristan.