public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: ali hagigat <hagigatali@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: questions about objcopy and ld
Date: Tue, 22 Feb 2011 15:26:00 -0000	[thread overview]
Message-ID: <4D63D5BF.9010002@redhat.com> (raw)
In-Reply-To: <AANLkTin-JDLZ+0v4vfcwU8g78F5grGocj7s4V2HaCG0n@mail.gmail.com>

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


      reply	other threads:[~2011-02-22 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 12:48 ali hagigat
2011-02-22 15:26 ` Nick Clifton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D63D5BF.9010002@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=hagigatali@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).