This is the mail archive of the
mailing list for the binutils project.
Re: Objcopy problem
On Tue, Oct 30, 2007 at 02:48:11PM +0000, Andrew STUBBS wrote:
> As you can see, the section now _has_ a file size. This was the point of the
> exercise - the section contents may now be overwritten with the final data (in
> this case a digital signature used to verify the other sections).
Objdump provides a slightly fuzzy, malleable view of an object file.
Readelf is more precise, and useful in these cases.
The question is, where do those bits go, and what has to move to fit
them? I think it's possible to change the alloc flag in a linked
file, since only file offsets change, but it may be a bit tricky.
> The linker will not allow us to create a loadable section for which we do not
> yet know the contents.
Sure it will. Just zero-fill it, and then set its contents later -
you know the size of the signature, right? You can just use .space.