lkml.org 
[lkml]   [2008]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] (updated, rolled up) make section names compatible with -ffunction-sections -fdata-sections
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


\
 
 \ /
  Last update: 2008-07-23 22:35    [W:0.116 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site