lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 May 2009 10:55:04 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux arch <linux-arch@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, Tim Abbott <tabbott@....edu>
Subject: Re: Minimal linker script

On Sat, May 09, 2009 at 04:27:20PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >  *      . = START;
> >  *      __init_begin = .;
> >  *      HEAD_SECTION
> >  *      INIT_TEXT_SECTION(PAGE_SIZE)
> >  *      INIT_DATA_SECTION(...)
> >  *      PERCPU(PAGE_SIZE)
> >  *      __init_end = .;
> >  *
> >  *      __text_begin = .;
> >  *      TEXT_SECTION = 0
> >  *      __text_end = .;
> >  *
> >  *      __data_begin = .;
> >  *      RO_DATA_SECTION(PAGE_SIZE)
> >  *      RW_DATA_SECTION(...)
> >  *      __data_end = .;
> >  *
> >  *      EXCEPTION_TABLE(...)
> >  *      NOTES
> >  *
> >  *      __bss_start = .;
> >  *      BSS_SECTION(0, 0)
> >  *      __bss_end = .;
> >  *      _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)

The 'oldish' names were kept only because they are widely used.
I agree to be consistent is better so will change it to be so.

I edited the sample above to consistently use __<section>_{begin,end}.

For now I kept '_end' as I had no better name for it.

> then at least in the
> i386 case we could easily recognize those as relocatable symbols even if
> they show up as absolute.

Do you then say that i386 could allow us to use absolute symbols,
and we could adjust in the code instead?

That would make the linker script nicer but with added
complexity in the code..

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ