Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: ik@cyberspace.org
Cc: kernelnewbies@nl.linux.org, linux-mips@linux-mips.org
Subject: Re: is there any docs/manuals for linker scripts symbols
Date: Tue, 24 Jun 2003 14:00:18 +0200	[thread overview]
Message-ID: <20030624120017.GE4423@linux-mips.org> (raw)
In-Reply-To: <Pine.SUN.3.96.1030624055005.4605A-100000@grex.cyberspace.org>

On Tue, Jun 24, 2003 at 06:00:16AM -0400, ik@cyberspace.org wrote:

> I'm porting Linux kernel to a mips board for which I need to understand
> the various symbols used in the kernel.
> 
> For example what is the use of the following symbols
> `__init_begin'
> `__init_end'
> `__initcall_start
> `__initcall_end'
> `_ftext'
> `__setup_start'
> `__setup_end'
> 
> I'm not good in these linker scripts... any help pointers would be of
> great help to me ! (I'm referrring gnu ld  manual pages ... still have a
> long way to go :(

You'll find more information in the GNU info pages than in the man page
which is sort of an option summary only.  Of course both only cover ld,
not the way it's actually being used in Linux.

_ftext is the start of the executable kernel code.  __init_begin and
__init_end wrap the kernel's initialization code which will be freed after
full initialization.  See arch/mips/mm/init.c:__init_begin() and
arch/mips/mm/init.c:free_initmem() for how it's used.

__initcall_start and __initcall_end are used for the initcalls in
init/main.c.  See how those symbols are used in init/main.c:do_initcalls().
__setup_start and __setup_end are used in similarly obscure way to mark
start and end of the .setup.init section; see init/main.c:checksetup()
and <linux/init.h> for it's use.

  Ralf

  parent reply	other threads:[~2003-06-24 12:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-24 10:00 is there any docs/manuals for linker scripts symbols ik
2003-06-24 10:00 ` ik
2003-06-24 12:00 ` Ralf Baechle [this message]
2003-06-25 12:01   ` ik
2003-06-25 12:01     ` ik
2003-06-25 12:18     ` Ralf Baechle
2003-07-01 12:39       ` ik
2003-07-01 12:39         ` ik
2003-06-25  2:01 ` Fuxin Zhang

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=20030624120017.GE4423@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=ik@cyberspace.org \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-mips@linux-mips.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