kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: carlo.caione@gmail.com (Carlo Caione)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Query on linker scripts
Date: Sat, 24 Mar 2012 16:26:38 +0100	[thread overview]
Message-ID: <4F6DE7AE.9070808@gmail.com> (raw)
In-Reply-To: <CAKuUYSw=_zZykPWeTbJsGEYPPSroWK+whm0o5L_PnCManVcrng@mail.gmail.com>

On 24/03/2012 05:43, Vaibhav Jain wrote:
> Hi,
[cut]
> is confusing. An example is the use of symbols sbss and ebss in the bss
> section as show in the script below
> ENTRY (loader)
> SECTIONS
> {
>      . = 0x00100000;
>      .text ALIGN (0x1000) :
>      {
>          *(.text)
>      }
>      .rodata ALIGN (0x1000) :
>      {
>          *(.rodata*)
>      }
>      .data ALIGN (0x1000) :
>      {
>          *(.data)
>      }
>      .bss :
>      {
>          sbss = .;
>          *(COMMON)
>          *(.bss)
>          ebss = .;
>      }
> }

I'm not sure if you are OT, anyway...

i.e. they are useful if you want to clear the bss section before execution.

[snippet for ARM proc]
...
	ldr	r2, =_sbss
	b	LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
	movs	r3, #0
	str	r3, [r2], #4

LoopFillZerobss:
	ldr	r3, = _ebss
	cmp	r2, r3
	bcc	FillZerobss
...

--
Carlo Caione

  reply	other threads:[~2012-03-24 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24  4:43 Query on linker scripts Vaibhav Jain
2012-03-24 15:26 ` Carlo Caione [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-24 18:45 Pranay Kumar Srivastava
     [not found] ` <CAKuUYSwPiuGTa+8r6O+-GMLu9e6dXOXNfDHu4UBx2yvrHcQyvw@mail.gmail.com>
2012-03-26  6:41   ` Pranay Kumar Srivastava
2012-03-26 11:01     ` Vaibhav Jain
2012-03-26 11:54       ` Pranay Kumar Srivastava
2012-03-27  1:38         ` Vaibhav Jain
2012-03-27 11:00           ` Pranay Kumar Srivastava
2012-03-26 15:14       ` Dave Hylands

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=4F6DE7AE.9070808@gmail.com \
    --to=carlo.caione@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 NNTP newsgroup(s).