This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Adding new section to core file
- From: Alan Modra <amodra at gmail dot com>
- To: vaibhav sinha <vaibhavsinh at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 8 Apr 2015 12:44:15 +0930
- Subject: Re: Adding new section to core file
- Authentication-results: sourceware.org; auth=none
- References: <CADXYU77QvwjG+sVYaCcx0taO1yQG_zqqnrzh=b90UOpP_LHwQw at mail dot gmail dot com>
On Mon, Apr 06, 2015 at 07:00:00PM +0530, vaibhav sinha wrote:
> As I understand, core files are also in ELF format. I want to add a
> new section to the core file. I know how to do that for an executable
> using objcopy, as shown below:
But, you didn't "do that for an executable". You added the extra
section to a relocatable object file. That is very different from
adding a section to an executable (or core file). Generally, you
can't successfully change executables using objcopy in ways that
require addresses to change.
--
Alan Modra
Australia Development Lab, IBM