public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux arch <linux-arch@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Tim Abbott <tabbott@mit.edu>
Subject: Re: Minimal linker script
Date: Sat, 09 May 2009 16:27:20 -0700	[thread overview]
Message-ID: <4A061158.3010604@zytor.com> (raw)
In-Reply-To: <20090509080006.GA22617@uranus.ravnborg.org>

Sam Ravnborg wrote:
>  *      . = START;
>  *      __init_begin = .;
>  *      HEAD_SECTION
>  *      INIT_TEXT_SECTION(PAGE_SIZE)
>  *      INIT_DATA_SECTION(...)
>  *      PERCPU(PAGE_SIZE)
>  *      __init_end = .;
>  *
>  *      _stext = .;
>  *      TEXT_SECTION = 0
>  *      _etext = .;
>  *
>  *      _sdata = .;
>  *      RO_DATA_SECTION(PAGE_SIZE)
>  *      RW_DATA_SECTION(...)
>  *      _edata = .;
>  *
>  *      EXCEPTION_TABLE(...)
>  *      NOTES
>  *
>  *      __bss_start = .;
>  *      BSS_SECTION(0, 0)
>  *      __bss_stop = .;
>  *      _end = .;
>  *
>  *
>  * [__init_begin, __init_end] is the init section that may be freed after init
>  * [_stext, _etext] is the text section
>  * [_sdata, _edata] is the data section
>  *
>  * Some of the included output section include their own set of constants.
>  * Examples are: [__initramfs_start, __initramfs_end] for initramfs and
>  *               [__nosave_begin, __nosave_end] for the nosave data
>  */
> 

It seems rather disturbing to me that different sections have different
start and end symbols.  I realize this is largely for historical
reasons, but if we used a single pattern (e.g. something like
__text_start, __text_end for the .text section) then at least in the
i386 case we could easily recognize those as relocatable symbols even if
they show up as absolute.

Furthermore, consistency is a good thing, even if it means a bigger
changeset.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

  reply	other threads:[~2009-05-09 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-09  8:00 Minimal linker script Sam Ravnborg
2009-05-09 23:27 ` H. Peter Anvin [this message]
2009-05-09 23:27   ` H. Peter Anvin
2009-05-10  8:55   ` Sam Ravnborg
2009-05-10 17:53     ` H. Peter Anvin

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=4A061158.3010604@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tabbott@mit.edu \
    /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