questions about objcopy and ld
Nick Clifton
nickc@redhat.com
Tue Feb 22 15:26:00 GMT 2011
Hi Ali,
> Does objcopy adds a final 0 to the outfile? I use it, it seems that
> one byte is extra.
No. At least I do not see why it would. Do you have a specific example
that we could look at ?
> When we create some sections by ld, does the size of these sections
> have to be a multiple of a number?
It depends upon the section type and the target, but in general the
answer is yes.
> (some sort of alignment) and what is that number?
The alignment. The specific value for alignments varies with different
sections and different targets. When the linker creates an output
section it sets its alignment to largest alignment value of any of the
input section whose contents are being mapped into that output section.
Cheers
Nick
More information about the Binutils
mailing list