All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Nilsson <jesper.nilsson@axis.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"x86@kernel.org" <x86@kernel.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Russell King <rmk@arm.linux.org.uk>,
	David Howells <dhowells@redhat.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	Josh Boyer <jwboyer@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Andi Kleen <andi@firstfloor.org>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tim Bird <tim.bird@am.sony.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Dave Miller <davem@davemloft.net>
Subject: Re: [PATCH] (updated, rolled up) make section names compatible with -ffunction-sections -fdata-sections
Date: Wed, 23 Jul 2008 22:21:48 +0200	[thread overview]
Message-ID: <20080723202148.GA2949@axis.com> (raw)
In-Reply-To: <200807172213.37411.vda.linux@googlemail.com>

On Thu, Jul 17, 2008 at 10:13:37PM +0200, Denys Vlasenko wrote:
> Hi Andrew,
> 
> Here is the update against current Linus tree,
> rolled up into one patch.
> 
> James Bottomley suggested a different naming scheme:
> instead of swapping parts (.text.head -> .head.text),
> prepend .kernel to our special section names.
> This patch implements his idea.
> 
> ppc and v850 are dropped per comments from arch people.
> parisc and x86 had minor fixes. x86 fix added proper
> executable bits to a section:
> 
> -.section ".text.head"
> +.section ".kernel.text.head","ax",@progbits
> 
> Does arch/m68k/kernel/sun3-head.S need the same fix?
> 
> The patch is run-tested on x86_64.
> 
> I would like to ask arch maintainers to ACK/NAK this patch,
> and Andrew to act accordingly.
> 
> Changelog follows:
> 
> 
> 
> The purpose of these patches is to make kernel buildable
> with "gcc -ffunction-sections -fdata-sections".
> 
> The problem is that with -ffunction-sections -fdata-sections gcc
> creates sections like .text.head and .data.nosave
> whenever someone has innocuous code like this:
> 
> static void head(...) {...}
> 
> or this:
> 
> int f(...) { static int nosave; ... }
> 
> somewhere in the kernel.
> 
> Kernel linker script is confused by such names and puts these sections
> in wrong places.
> 
> This patch renames all "magic" section names used by kernel
> to not have this format, eliminating the possibility of such collisions.
> 
> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

CRIS part:

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>

> vda

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

      parent reply	other threads:[~2008-07-23 20:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 20:13 [PATCH] (updated, rolled up) make section names compatible with -ffunction-sections -fdata-sections Denys Vlasenko
2008-07-18  1:15 ` Mike Frysinger
2008-07-18  6:17 ` Geert Uytterhoeven
2008-07-18  8:14 ` Ralf Baechle
2008-07-18  8:48 ` Ingo Molnar
2008-07-18 10:46 ` Greg Ungerer
2008-07-18 11:53 ` David Howells
2008-07-23 20:21 ` Jesper Nilsson [this message]

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=20080723202148.GA2949@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=kernel@wantstofly.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paul.gortmaker@windriver.com \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=schwidefsky@de.ibm.com \
    --cc=tim.bird@am.sony.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vda.linux@googlemail.com \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.