public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* questions about objcopy and ld
@ 2011-02-09 12:48 ali hagigat
  2011-02-22 15:26 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: ali hagigat @ 2011-02-09 12:48 UTC (permalink / raw)
  To: binutils

Does objcopy adds a final 0 to the outfile? I use it, it seems that
one byte is extra.
When we create some sections by ld, does the size of these sections
have to be a multiple of a number?(some sort of alignment) and what is
that number?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: questions about objcopy and ld
  2011-02-09 12:48 questions about objcopy and ld ali hagigat
@ 2011-02-22 15:26 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-02-22 15:26 UTC (permalink / raw)
  To: ali hagigat; +Cc: binutils

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-22 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 12:48 questions about objcopy and ld ali hagigat
2011-02-22 15:26 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).