public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Torsten Mohr <tmohr@s.netic.de>
Cc: binutils@sourceware.org
Subject: Re: sections, overview of their meaning?
Date: Sun, 07 May 2006 23:05:00 -0000	[thread overview]
Message-ID: <445E0F2E.2000509@redhat.com> (raw)
In-Reply-To: <200605061326.26393.tmohr@s.netic.de>

Hi Torsten,

> there are lots of different sections in linker scripts, i know
> some of them but there are quite many that i don't know.
> 
> Is there somewhere an overview on the sections and what is meant
> to go into them?

Sorry no.  Sections can have arbitrary names and arbitrary contents, and 
there is no one single place where these names and contents are specified.

Some section names are commonly known and have a reasonably well defined 
purpose.  You probably know these names already.  eg: .text for code, 
.data for initialised, modifiable data, .bss for zero-initialised or 
uninitialised data, .rdata for non-modifiable data.

Other sections are often documented in the EABI for each particular 
processor.  So for example the ARM EABI describes sections called 
.ARM.exidx and .ARM.attributes.  (I tried to find a V850 based example, 
but I cannot find the ABI for this processor).

Otherwise the best guess is the name of the section itself.  Sometimes 
there will be comments in the linker script explaining what the section 
is for, but this is not always done.  For example the .zdata data 
section used by the V850 linker scripts is there for data that is 
accessed relative to r0 register, as hinted at by the "z" in the name, 
and the .rosdata section is for read-only data that is accessed via the 
global pointer register (r4), as hinted at by the definition of the __gp 
symbol in the .sdata section.

For sections that still mystify you please feel free to ask on this 
list, or search for references to them in the code for gas and gcc.

Cheers
   Nick


  reply	other threads:[~2006-05-07 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06 17:15 Torsten Mohr
2006-05-07 23:05 ` Nick Clifton [this message]
2006-05-08  5:49   ` Torsten Mohr
2006-05-08  6:43     ` Ravi Ramaseshan
2006-05-08 15:58       ` Torsten Mohr
2006-05-08 19:21     ` Nick Clifton

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=445E0F2E.2000509@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=tmohr@s.netic.de \
    /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).