From: Sam Ravnborg <sam@ravnborg.org>
To: Matt Fleming <matt@console-pimps.org>
Cc: linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Tim Abbott <tabbott@ksplice.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT
Date: Mon, 14 Jun 2010 20:22:12 +0200 [thread overview]
Message-ID: <20100614182212.GA14747@merkur.ravnborg.org> (raw)
In-Reply-To: <1276519112-11649-1-git-send-email-matt@console-pimps.org>
On Mon, Jun 14, 2010 at 01:38:28PM +0100, Matt Fleming wrote:
> From: Matt Fleming <matthew.fleming@imgtec.com>
>
> Many architectures collect text sections beginning with '.text.' in
> their .text section, so move this pattern into TEXT_TEXT to stop them
> all having to duplicate the pattern in their arch/ linker scripts.
>
> Signed-off-by: Matt Fleming <matthew.fleming@imgtec.com>
> ---
> include/asm-generic/vmlinux.lds.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 48c5299..08f4680 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -369,6 +369,7 @@
> ALIGN_FUNCTION(); \
> *(.text.hot) \
> *(.text) \
> + *(.text.*) \
> *(.ref.text) \
> DEV_KEEP(init.text) \
> DEV_KEEP(exit.text) \
This will break ia64.
From their vmlinux.lds.h:
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
*(.gnu.linkonce.t*)
}
.text2 : AT(ADDR(.text2) - LOAD_OFFSET)
{ *(.text2) }
#ifdef CONFIG_SMP
.text..lock : AT(ADDR(.text..lock) - LOAD_OFFSET)
{ *(.text..lock) }
#endif
The patch above we would match the section ".text.*" too soon and
add the .text..lock section at the wrong place.
Browsing the vmlinux.lds files other archs will be impacted too.
If you feel tempted to clean up the linker script one place to start
would be to introduce consistent indention / layout.
If you use arch/sparc/kernel/vmlinux.lds.h as a template then you
have a good start.
The above mentioned ia64 vmlinux.lds.h would be a good place to start.
Sam
next prev parent reply other threads:[~2010-06-14 18:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 12:38 [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT Matt Fleming
2010-06-14 12:38 ` Matt Fleming
2010-06-14 12:38 ` [PATCH 2/5] blackfin: Remove *(.text.*) pattern from the linker script Matt Fleming
2010-06-14 12:38 ` Matt Fleming
2010-06-14 19:58 ` Mike Frysinger
2010-06-14 12:38 ` [PATCH 3/5] mips: " Matt Fleming
2010-06-14 12:38 ` Matt Fleming
2010-06-14 12:38 ` [PATCH 4/5] parisc: " Matt Fleming
2010-06-14 12:38 ` Matt Fleming
2010-06-14 15:20 ` James Bottomley
2010-06-14 19:13 ` Matt Fleming
2010-06-14 12:38 ` [PATCH 5/5] score: " Matt Fleming
2010-06-14 12:38 ` Matt Fleming
2010-06-14 14:32 ` [PATCH 1/5] vmlinux.lds.h: Include *(.text.*) in TEXT_TEXT Tim Abbott
2010-06-14 19:33 ` Matt Fleming
2010-06-14 20:05 ` James Bottomley
2010-06-14 22:02 ` Tim Abbott
2010-06-14 23:08 ` James Bottomley
2010-06-15 2:45 ` Tim Abbott
2010-06-15 2:45 ` Tim Abbott
2010-06-16 21:40 ` James Bottomley
2010-06-16 21:40 ` James Bottomley
2010-06-17 19:11 ` Denys Vlasenko
2010-06-17 19:56 ` James Bottomley
2010-06-17 20:19 ` Denys Vlasenko
2010-06-17 20:19 ` Denys Vlasenko
2010-06-17 20:38 ` James Bottomley
2010-06-17 18:54 ` Denys Vlasenko
2010-06-14 22:21 ` Tim Abbott
2010-06-14 23:14 ` James Bottomley
2010-06-15 2:52 ` Tim Abbott
2010-06-15 2:52 ` Tim Abbott
2010-06-14 18:22 ` Sam Ravnborg [this message]
2010-06-14 18:22 ` Sam Ravnborg
2010-06-14 19:21 ` Matt Fleming
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=20100614182212.GA14747@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=tabbott@ksplice.com \
/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).