* Re: [PATCH 3/23] make section names compatible with -ffunction-sections -fdata-sections: arm
From: Roberto A. Foglietta @ 2008-07-02 6:22 UTC (permalink / raw)
To: Denys Vlasenko
Cc: linux-arch, Russell King, David Howells, Ralf Baechle,
Lennert Buytenhek, Josh Boyer, Paul Mackerras, David Woodhouse,
Andi Kleen, torvalds, akpm, Paul Gortmaker, linux-embedded,
linux-kernel, Tim Bird, Martin Schwidefsky, Dave Miller
In-Reply-To: <200807020234.26755.vda.linux@googlemail.com>
2008/7/2 Denys Vlasenko <vda.linux@googlemail.com>:
> The purpose of this patch is to make kernel buildable
> with "gcc -ffunction-sections -fdata-sections".
> This patch fixes arm architecture.
>
Hi Denys,
I see your patchset. may I suggest you to take a look to this tools?
http://www.emn.fr/x-info/coccinelle/
I think it could simplify this kind of patching for the future.
I found it reading the kernel janitors m-list and I hope it helps.
Cheers,
--
/roberto
^ permalink raw reply
* Re: [PATCH 1/23] make section names compatible with -ffunction-sections -fdata-sections
From: Andrew Morton @ 2008-07-02 4:30 UTC (permalink / raw)
To: Denys Vlasenko
Cc: linux-arch, Russell King, David Howells, Ralf Baechle,
Lennert Buytenhek, Josh Boyer, Paul Mackerras, David Woodhouse,
Andi Kleen, torvalds, Paul Gortmaker, linux-embedded,
linux-kernel, Tim Bird, Martin Schwidefsky, Dave Miller
In-Reply-To: <200807020233.48646.vda.linux@googlemail.com>
On Wed, 2 Jul 2008 02:33:48 +0200 Denys Vlasenko <vda.linux@googlemail.com> wrote:
> Hi Andrew, folks,
>
> I am unsure how to synchronize propagation of these patches
> across all architectures.
>
> Andrew, how this can be done without causing lots of pain
> for arch maintainers? Please advise.
You didn't describe the problem which you're trying to solve, so how
can I say?
Possibilities are:
a) the generic bit depends on the arch bits
-> No probs. I can merge the generic bit once all architectures are in.
b) the arch bits depend on the generic bits
-> No probs. I can merge the generic bit then send all the arch bits.
c) they each depend on each other
-> No probs. We go round gaththering acks, slam it all into
a single patch then in it goes. 2.6.28, presumably.
d) something else
-> please do tell.
> The purpose of these patches is to make kernel buildable
> with "gcc -ffunction-sections -fdata-sections".
>
> Newer gcc and binutils can do dead code and data removal
> at link time. It is achieved using combination of
> -ffunction-sections -fdata-sections options for gcc and
> --gc-sections for ld.
>
> Theory of operation:
>
> -ffunction-sections instructs gcc to place each function
> (including static ones) in it's own section named .text.function_name
> instead of placing all functions in one big .text section.
>
> At link time, ld normally coalesce all such sections into one
> output section .text again. It is achieved by having *(.text.*) spec
> along with *(.text) spec in built-in linker scripts.
>
> If ld is invoked with --gc-sections, it tracks references, starting
> from entry point and marks all input sections which are reachable
> from there. Then it discards all input sections which are not marked.
>
> This isn't buying much if you have one big .text section per .o module,
> because even one referenced function will pull in entire section.
> You need -ffunction-sections in order to split .text into per-function
> sections and make --gc-sections much more useful.
>
> -fdata-sections is analogous: it places each global or static variable
> into .data.variable_name, .rodata.variable_name or .bss.variable_name.
>
> If we ever want to use described mechanism, we need to adapt
> existing code for new section names. Basically, we need to stop using
> section names of the form
> .text.xxxx
> .data.xxxx
> .rodata.xxxx
> .bss.xxxx
> in the kernel - otherwise section placement done by kernel's
> custom linker scripts produces broken vmlinux and vdso images.
>
> The following patches fix section names, one per architecture.
>
> The patch in _this_ mail fixes generic part.
(tries to work out what it does)
oh, it does the above section renaming. So I guess we're looking at
scenario c), above?
"otherwise section placement done by kernel's custom linker scripts
produces broken vmlinux and vdso images" is an inadequate description.
Please describe the problem more completely. This is important,
because once we actually find out what the patch is fixing, perhaps
others will be aware of less intrusive ways of fixing the problem, and
we end up with a better patch.
Please be aware that last time someone tried function-sections, maybe
five years ago, problems were encountered with linker efficiency
(possible an O(nsections) or worse algorithm in ld). Link times went
up a lot.
So it would be good to hunt down some old ld versions and run some
timings. A mention of the results in the changelog is appropriate.
Is there actually a patch anywhere which enables function-sections for
some architectures? It would be good to see that (and its associated
size-reduction results) so we can work out whether all these changes
are worth pursuing.
> ...
>
> --- 0.org/scripts/mod/modpost.c Wed Jul 2 00:40:54 2008
> +++ 1.fixname/scripts/mod/modpost.c Wed Jul 2 00:54:21 2008
> @@ -794,9 +794,9 @@
> /* sections that may refer to an init/exit section with no warning */
> static const char *initref_sections[] =
> {
> - ".text.init.refok*",
> - ".exit.text.refok*",
> - ".data.init.refok*",
> + ".init.refok.text*",
> + ".exit.refok.text*",
> + ".init.refok.data*",
> NULL
> };
>
> @@ -915,7 +915,7 @@
> * Pattern 0:
> * Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
> * The pattern is identified by:
> - * fromsec = .text.init.refok* | .data.init.refok*
> + * fromsec = .init.refok.text* | .init.refok.data*
> *
> * Pattern 1:
> * If a module parameter is declared __initdata and permissions=0
> @@ -939,8 +939,8 @@
> * *probe_one, *_console, *_timer
> *
> * Pattern 3:
> - * Whitelist all refereces from .text.head to .init.data
> - * Whitelist all refereces from .text.head to .init.text
> + * Whitelist all refereces from .head.text to .init.data
> + * Whitelist all refereces from .head.text to .init.text
um, this would be a good occasion for us to have another attempt at
spelling "references".
^ permalink raw reply
* Re: [PATCH 5/23] make section names compatible with -ffunction-sections -fdata-sections: blackfin
From: Mike Frysinger @ 2008-07-02 2:09 UTC (permalink / raw)
To: Denys Vlasenko
Cc: linux-arch, Russell King, David Howells, Ralf Baechle,
Lennert Buytenhek, Josh Boyer, Paul Mackerras, David Woodhouse,
Andi Kleen, torvalds, akpm, Paul Gortmaker, linux-embedded,
linux-kernel, Tim Bird, Martin Schwidefsky, Dave Miller
In-Reply-To: <200807020208.33302.vda.linux@googlemail.com>
On Tue, Jul 1, 2008 at 8:08 PM, Denys Vlasenko wrote:
> On Wednesday 02 July 2008 00:58, Mike Frysinger wrote:
>> On Tue, Jul 1, 2008 at 8:35 PM, Denys Vlasenko wrote:
>> > The purpose of this patch is to make kernel buildable
>> > with "gcc -ffunction-sections -fdata-sections".
>> > This patch fixes blackfin architecture.
>>
>> the comment right above what you changed says it already works for
>> Blackfin. so you arent fixing it at all.
>> > /* This gets done first, so the glob doesn't suck it in */
>> > . = ALIGN(32);
>> > - *(.data.cacheline_aligned)
>> > + *(.cacheline_aligned.data)
>
> This may pull in an unrelated data object named "cacheline_aligned"
> (say, a static variable in a driver). If that variable is not
> itself aligned to the cacheline size, it will mess up alignment of all
> objects in .data.cacheline_aligned which follow. Not good.
>
> To be safe from such weird and hard to debug problems
> it's better to not use names like .data.XXXX at all.
> I just uniformly renamed al such "special sections"
> in the kernel to .XXXXX.data
you're right of course ... i obviously hadnt thought of this. please
however still abstract this stuff into the common header.
i just tested the current Blackfin kernel and it does build/link/run
fine with -ffunction-sections/-fdata-sections. however, --gc-sections
still causes crashes (but this is because all of the .init.setup
sections are flagged as unused).
-mike
^ permalink raw reply
* Re: [PATCH v4 2/6] dmaengine: Add dma_chan_is_in_use() function
From: Dan Williams @ 2008-07-02 2:00 UTC (permalink / raw)
To: Haavard Skinnemoen
Cc: Pierre Ossman, linux-kernel, linux-embedded, kernel,
shannon.nelson, David Brownell
In-Reply-To: <e9c3a7c20807011831n74eb69b8r3095b62515fe5c9@mail.gmail.com>
On Tue, Jul 1, 2008 at 6:31 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> On Thu, Jun 26, 2008 at 6:23 AM, Haavard Skinnemoen
> <haavard.skinnemoen@atmel.com> wrote:
>> This moves the code checking if a DMA channel is in use from
>> show_in_use() into an inline helper function, dma_is_in_use(). DMA
>> controllers can use this in order to give clients exclusive access to
>> channels (usually necessary when setting up slave DMA.)
>>
>> I have to admit that I don't really understand the channel refcounting
>> logic at all... dma_chan_get() simply increments a per-cpu value. How
>> can we be sure that whatever CPU calls dma_chan_is_in_use() sees the
>> same value?
>
> As Chris noted in the comments at the top of dmaengine.c this is an
> implementation Rusty's 'bigref'. It seeks to avoid the
> cache-line-bouncing overhead of maintaining a single global refcount
> in hot paths like tcp_v{4,6}_rcv(). When the channel is being
> removed, a rare event, we transition to the accurate, yet slow, global
> method.
>
> Your observation is correct, dma_chan_is_in_use() may lie in the case
> when the current cpu is not using the channel. For this particular
> test I think you can look to see if this channel's resources are
> already allocated. If they are then some other client got a hold of
> this channel before the current attempt. Hmm... that would also
> require that we free the channel's resources in the case where the
> client replies with DMA_NAK, probably something we should do anyways.
>
> Thoughts?
>
Actually we will probably need something like the following.
->client_count is protected by the dma_list_mutex.
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 99c22b4..10de69e 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -183,9 +183,10 @@ static void dma_client_chan_alloc(struct
dma_client *client)
/* we are done once this client rejects
* an available resource
*/
- if (ack == DMA_ACK)
+ if (ack == DMA_ACK) {
dma_chan_get(chan);
- else if (ack == DMA_NAK)
+ chan->client_count++;
+ } else if (ack == DMA_NAK)
return;
}
}
@@ -272,8 +273,10 @@ static void dma_clients_notify_removed(struct
dma_chan *chan)
/* client was holding resources for this channel so
* free it
*/
- if (ack == DMA_ACK)
+ if (ack == DMA_ACK) {
dma_chan_put(chan);
+ chan->client_count--;
+ }
}
mutex_unlock(&dma_list_mutex);
@@ -313,8 +316,10 @@ void dma_async_client_unregister(struct dma_client *client)
ack = client->event_callback(client, chan,
DMA_RESOURCE_REMOVED);
- if (ack == DMA_ACK)
+ if (ack == DMA_ACK) {
dma_chan_put(chan);
+ chan->client_count--;
+ }
}
list_del(&client->global_node);
@@ -394,6 +399,7 @@ int dma_async_device_register(struct dma_device *device)
kref_get(&device->refcount);
kref_get(&device->refcount);
kref_init(&chan->refcount);
+ chan->client_count = 0;
chan->slow_ref = 0;
INIT_RCU_HEAD(&chan->rcu);
}
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index d08a5c5..6432b83 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -139,6 +139,7 @@ struct dma_chan_percpu {
* @rcu: the DMA channel's RCU head
* @device_node: used to add this to the device chan list
* @local: per-cpu pointer to a struct dma_chan_percpu
+ * @client-count: how many clients are using this channel
*/
struct dma_chan {
struct dma_device *device;
@@ -154,6 +155,7 @@ struct dma_chan {
struct list_head device_node;
struct dma_chan_percpu *local;
+ int client_count;
};
#define to_dma_chan(p) container_of(p, struct dma_chan, dev)
^ permalink raw reply related
* Re: [PATCH v4 2/6] dmaengine: Add dma_chan_is_in_use() function
From: Dan Williams @ 2008-07-02 1:31 UTC (permalink / raw)
To: Haavard Skinnemoen
Cc: Pierre Ossman, linux-kernel, linux-embedded, kernel,
shannon.nelson, David Brownell
In-Reply-To: <1214486603-23655-3-git-send-email-haavard.skinnemoen@atmel.com>
On Thu, Jun 26, 2008 at 6:23 AM, Haavard Skinnemoen
<haavard.skinnemoen@atmel.com> wrote:
> This moves the code checking if a DMA channel is in use from
> show_in_use() into an inline helper function, dma_is_in_use(). DMA
> controllers can use this in order to give clients exclusive access to
> channels (usually necessary when setting up slave DMA.)
>
> I have to admit that I don't really understand the channel refcounting
> logic at all... dma_chan_get() simply increments a per-cpu value. How
> can we be sure that whatever CPU calls dma_chan_is_in_use() sees the
> same value?
As Chris noted in the comments at the top of dmaengine.c this is an
implementation Rusty's 'bigref'. It seeks to avoid the
cache-line-bouncing overhead of maintaining a single global refcount
in hot paths like tcp_v{4,6}_rcv(). When the channel is being
removed, a rare event, we transition to the accurate, yet slow, global
method.
Your observation is correct, dma_chan_is_in_use() may lie in the case
when the current cpu is not using the channel. For this particular
test I think you can look to see if this channel's resources are
already allocated. If they are then some other client got a hold of
this channel before the current attempt. Hmm... that would also
require that we free the channel's resources in the case where the
client replies with DMA_NAK, probably something we should do anyways.
Thoughts?
--
Dan
^ permalink raw reply
* Re: [PATCH 1/23] make section names compatible with -ffunction-sections -fdata-sections
From: Eduard - Gabriel Munteanu @ 2008-07-02 1:28 UTC (permalink / raw)
To: Denys Vlasenko
Cc: linux-arch, Andrew Morton, Russell King, David Howells,
Ralf Baechle, Lennert Buytenhek, Josh Boyer, Paul Mackerras,
David Woodhouse, Andi Kleen, torvalds, Paul Gortmaker,
linux-embedded, linux-kernel, Tim Bird, Martin Schwidefsky,
Dave Miller
In-Reply-To: <200807020233.48646.vda.linux@googlemail.com>
On Wed, 2 Jul 2008 02:33:48 +0200
Denys Vlasenko <vda.linux@googlemail.com> wrote:
> Hi Andrew, folks,
>
> I am unsure how to synchronize propagation of these patches
> across all architectures.
>
> Andrew, how this can be done without causing lots of pain
> for arch maintainers? Please advise.
Hi,
AFAICS, there is a lot of code in .lds.S files which really is
arch-independent, but still is duplicated in every arch. Kinda messy to
change anything in there.
I noticed this while writing another patch, namely early (pre-SMP)
initcall support. Fortunately, there was a generic header included by
all .lds.S files and I could fit my modification in there.
My suggestion is (for both you and arch maintainers)... why not make an
effort to reduce code duplication in these files? Life would be so much
easier. The idea is:
- Write a macro to define all generic sections, possibly taking in
alignment as an argument.
- Have each arch's .lds.S file define arch-dependent stuff and use that
macro for generic sections.
This would surely be immediately useful, more readily accepted by
maintainers and would open up the way for a lighter version of your
patch, IMO.
Cheers,
Eduard
^ permalink raw reply
* Re: [PATCH 14/23] make section names compatible with -ffunction-sections -fdata-sections: parisc
From: James Bottomley @ 2008-07-02 1:23 UTC (permalink / raw)
To: Denys Vlasenko
Cc: linux-arch, Russell King, David Howells, Ralf Baechle,
Lennert Buytenhek, Josh Boyer, Paul Mackerras, David Woodhouse,
Andi Kleen, torvalds, akpm, Paul Gortmaker, linux-embedded,
linux-kernel, Tim Bird, Martin Schwidefsky, Dave Miller
In-Reply-To: <200807020200.49518.vda.linux@googlemail.com>
On Wed, 2008-07-02 at 02:00 +0200, Denys Vlasenko wrote:
> On Wednesday 02 July 2008 01:41, James Bottomley wrote:
> > On Wed, 2008-07-02 at 02:39 +0200, Denys Vlasenko wrote:
> > > The purpose of this patch is to make kernel buildable
> > > with "gcc -ffunction-sections -fdata-sections".
> > > This patch fixes parisc architecture.
> > >
> > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
> >
> > Um ... if you look at the Makefile you'll see we already build parisc
> > with -ffunction-sections; we have to: our relative jumps are too small
> > to guarantee finding the stubs in large files.
> >
> > Since our text is -ffunction-sections compatible already, I question the
> > need for transformations like this:
> >
> > > - *(.text.do_softirq)
> > > - *(.text.sys_exit)
> > > - *(.text.do_sigaltstack)
> > > - *(.text.do_fork)
> > > + *(.do_softirq.text)
> > > + *(.sys_exit.text)
> > > + *(.do_sigaltstack.text)
> > > + *(.do_fork.text)
>
> arch/parisc/kernel/vmlinux.lds.S contains these lines:
>
> TEXT_TEXT
> SCHED_TEXT
> LOCK_TEXT
> *(.text.do_softirq)
> *(.text.sys_exit)
> *(.text.do_sigaltstack)
> *(.text.do_fork)
>
> which suggested to me that for parisc it is important to have
> these sections in that place (after LOCK_TEXT) and order.
Yes ... moderately.
> If you use -ffunction-sections, any function with the name
> do_fork (say, a static function somewhere) will end up in
> .text.do_fork function, and will be "mixed up" with
> global do_fork(). For parisc it is maybe not a problem
> (I am not an expert) but in other places/arches people
> clearly would not want this kind of things to happen.
Erm, but we're trying to name text sections of the -ffunction-sections.
We're doing this because we are trying to do a semblance of a reasonable
arrangement for the relative jumps (and avoid stubs). Your patch is
explicitly breaking all of this.
> In order to handle these situations uniformly, in these patches
> I decided to _never_ use .text.XXXX names for sections,
> effectively leaving them "reserved for gcc's use".
We need to use the names gcc outputs, not some random name.
> Did I understand you right that in this chunk I need to
> leave .text.FUNC_NAME as it was before?
Yes.
> > And thus by the same token the data transformations.
>
> It would be easiest for me if you will reply to the parisc patch
> and indicate all parts where I should NOT do name change.
That would be the piece above.
James
^ permalink raw reply
* [PATCH 23/23] make section names compatible with -ffunction-sections -fdata-sections: xtensa
From: Denys Vlasenko @ 2008-07-02 0:43 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes xtensa architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/xtensa/kernel/head.S Wed Jul 2 00:40:43 2008
+++ 1.fixname/arch/xtensa/kernel/head.S Wed Jul 2 00:47:00 2008
@@ -234,7 +234,7 @@
* BSS section
*/
-.section ".bss.page_aligned", "w"
+.section ".bss.k.page_aligned", "w"
ENTRY(swapper_pg_dir)
.fill PAGE_SIZE, 1, 0
ENTRY(empty_zero_page)
--- 0.org/arch/xtensa/kernel/init_task.c Wed Jul 2 00:40:43 2008
+++ 1.fixname/arch/xtensa/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -29,7 +29,7 @@
EXPORT_SYMBOL(init_mm);
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
struct task_struct init_task = INIT_TASK(init_task);
--- 0.org/arch/xtensa/kernel/vmlinux.lds.S Wed Jul 2 00:40:43 2008
+++ 1.fixname/arch/xtensa/kernel/vmlinux.lds.S Wed Jul 2 00:47:00 2008
@@ -121,14 +121,14 @@
DATA_DATA
CONSTRUCTORS
. = ALIGN(XCHAL_ICACHE_LINESIZE);
- *(.data.cacheline_aligned)
+ *(.cacheline_aligned.data)
}
_edata = .;
/* The initial task */
. = ALIGN(8192);
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
/* Initialization code and data: */
@@ -259,7 +259,7 @@
/* BSS section */
_bss_start = .;
- .bss : { *(.bss.page_aligned) *(.bss) }
+ .bss : { *(.bss.k.page_aligned) *(.bss) }
_bss_end = .;
_end = .;
--- 0.org/include/asm-frv/init.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-frv/init.h Wed Jul 2 00:45:57 2008
@@ -1,12 +1,12 @@
#ifndef _ASM_INIT_H
#define _ASM_INIT_H
-#define __init __attribute__ ((__section__ (".text.init")))
-#define __initdata __attribute__ ((__section__ (".data.init")))
+#define __init __attribute__ ((__section__ (".init.text")))
+#define __initdata __attribute__ ((__section__ (".init.data")))
/* For assembly routines */
-#define __INIT .section ".text.init",#alloc,#execinstr
+#define __INIT .section ".init.text",#alloc,#execinstr
#define __FINIT .previous
-#define __INITDATA .section ".data.init",#alloc,#write
+#define __INITDATA .section ".init.data",#alloc,#write
#endif
^ permalink raw reply
* [PATCH 22/23] make section names compatible with -ffunction-sections -fdata-sections: x86
From: Denys Vlasenko @ 2008-07-02 0:42 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes x86 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/x86/boot/compressed/head_32.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/boot/compressed/head_32.S Wed Jul 2 00:44:22 2008
@@ -29,7 +29,7 @@
#include <asm/boot.h>
#include <asm/asm-offsets.h>
-.section ".text.head","ax",@progbits
+.section ".head.text","ax",@progbits
.globl startup_32
startup_32:
--- 0.org/arch/x86/boot/compressed/head_64.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/boot/compressed/head_64.S Wed Jul 2 00:44:22 2008
@@ -32,7 +32,7 @@
#include <asm/msr.h>
#include <asm/asm-offsets.h>
-.section ".text.head"
+.section ".head.text"
.code32
.globl startup_32
--- 0.org/arch/x86/boot/compressed/vmlinux_32.lds Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/boot/compressed/vmlinux_32.lds Wed Jul 2 00:44:22 2008
@@ -7,9 +7,9 @@
* address 0.
*/
. = 0;
- .text.head : {
+ .head.text : {
_head = . ;
- *(.text.head)
+ *(.head.text)
_ehead = . ;
}
.rodata.compressed : {
--- 0.org/arch/x86/boot/compressed/vmlinux_64.lds Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/boot/compressed/vmlinux_64.lds Wed Jul 2 00:44:22 2008
@@ -7,9 +7,9 @@
* address 0.
*/
. = 0;
- .text.head : {
+ .head.text : {
_head = . ;
- *(.text.head)
+ *(.head.text)
_ehead = . ;
}
.rodata.compressed : {
--- 0.org/arch/x86/kernel/acpi/wakeup_32.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/acpi/wakeup_32.S Wed Jul 2 00:56:50 2008
@@ -1,4 +1,4 @@
- .section .text.page_aligned
+ .section .page_aligned.text
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
--- 0.org/arch/x86/kernel/head_32.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/head_32.S Wed Jul 2 00:47:00 2008
@@ -81,7 +81,7 @@
* any particular GDT layout, because we load our own as soon as we
* can.
*/
-.section .text.head,"ax",@progbits
+.section .head.text,"ax",@progbits
ENTRY(startup_32)
/* test KEEP_SEGMENTS flag to see if the bootloader is asking
us to not reload segments */
@@ -602,7 +602,7 @@
/*
* BSS section
*/
-.section ".bss.page_aligned","wa"
+.section ".bss.k.page_aligned","wa"
.align PAGE_SIZE_asm
#ifdef CONFIG_X86_PAE
swapper_pg_pmd:
@@ -619,7 +619,7 @@
* This starts the data section.
*/
#ifdef CONFIG_X86_PAE
-.section ".data.page_aligned","wa"
+.section ".page_aligned.data","wa"
/* Page-aligned for the benefit of paravirt? */
.align PAGE_SIZE_asm
ENTRY(swapper_pg_dir)
--- 0.org/arch/x86/kernel/head_64.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/head_64.S Wed Jul 2 00:47:00 2008
@@ -32,7 +32,7 @@
*/
.text
- .section .text.head
+ .section .head.text
.code64
.globl startup_64
startup_64:
@@ -416,7 +416,7 @@
* Also sysret mandates a special GDT layout
*/
- .section .data.page_aligned, "aw"
+ .section .page_aligned.data, "aw"
.align PAGE_SIZE
/* The TLS descriptors are currently at a different place compared to i386.
@@ -448,7 +448,7 @@
ENTRY(idt_table)
.skip 256 * 16
- .section .bss.page_aligned, "aw", @nobits
+ .section .bss.k.page_aligned, "aw", @nobits
.align PAGE_SIZE
ENTRY(empty_zero_page)
.skip PAGE_SIZE
--- 0.org/arch/x86/kernel/init_task.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -24,7 +24,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
@@ -38,7 +38,7 @@
/*
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
* no more per-task TSS's. The TSS size is kept cacheline-aligned
- * so they are allowed to end up in the .data.cacheline_aligned
+ * so they are allowed to end up in the .cacheline_aligned.data
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
--- 0.org/arch/x86/kernel/irq_32.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/irq_32.c Wed Jul 2 00:47:00 2008
@@ -148,10 +148,10 @@
#ifdef CONFIG_4KSTACKS
static char softirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+ __attribute__((__section__(".bss.k.page_aligned")));
static char hardirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+ __attribute__((__section__(".bss.k.page_aligned")));
/*
* allocate per-cpu stacks for hardirq and for softirq processing
--- 0.org/arch/x86/kernel/setup64.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/setup64.c Wed Jul 2 00:47:00 2008
@@ -40,7 +40,7 @@
struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
-char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
+char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.k.page_aligned")));
unsigned long __supported_pte_mask __read_mostly = ~0UL;
EXPORT_SYMBOL_GPL(__supported_pte_mask);
@@ -121,7 +121,7 @@
}
char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
-__attribute__((section(".bss.page_aligned")));
+__attribute__((section(".bss.k.page_aligned")));
extern asmlinkage void ignore_sysret(void);
--- 0.org/arch/x86/kernel/traps_32.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/traps_32.c Wed Jul 2 00:46:32 2008
@@ -76,7 +76,7 @@
* for this.
*/
gate_desc idt_table[256]
- __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
+ __attribute__((__section__(".idt.data"))) = { { { { 0, 0 } } }, };
asmlinkage void divide_error(void);
asmlinkage void debug(void);
--- 0.org/arch/x86/kernel/vmlinux_32.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/vmlinux_32.lds.S Wed Jul 2 00:56:50 2008
@@ -31,15 +31,15 @@
. = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
phys_startup_32 = startup_32 - LOAD_OFFSET;
- .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
+ .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) {
_text = .; /* Text and read-only data */
- *(.text.head)
+ *(.head.text)
} :text = 0x9090
/* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */
- *(.text.page_aligned)
+ *(.page_aligned.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -79,32 +79,32 @@
. = ALIGN(PAGE_SIZE);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
}
. = ALIGN(PAGE_SIZE);
- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
- *(.data.page_aligned)
- *(.data.idt)
+ .page_aligned.data : AT(ADDR(.page_aligned.data) - LOAD_OFFSET) {
+ *(.page_aligned.data)
+ *(.idt.data)
}
. = ALIGN(32);
- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : AT(ADDR(.cacheline_aligned.data) - LOAD_OFFSET) {
+ *(.cacheline_aligned.data)
}
/* rarely changed data like cpu maps */
. = ALIGN(32);
- .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
- *(.data.read_mostly)
+ .read_mostly.data : AT(ADDR(.read_mostly.data) - LOAD_OFFSET) {
+ *(.read_mostly.data)
_edata = .; /* End of data section */
}
. = ALIGN(THREAD_SIZE); /* init_task */
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- *(.data.init_task)
+ .init_task.data : AT(ADDR(.init_task.data) - LOAD_OFFSET) {
+ *(.init_task.data)
}
/* might get freed after init */
@@ -187,10 +187,10 @@
}
#endif
. = ALIGN(PAGE_SIZE);
- .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
+ .percpu.data : AT(ADDR(.percpu.data) - LOAD_OFFSET) {
__per_cpu_start = .;
- *(.data.percpu)
- *(.data.percpu.shared_aligned)
+ *(.percpu.data)
+ *(.percpu.shared_aligned.data)
__per_cpu_end = .;
}
. = ALIGN(PAGE_SIZE);
@@ -199,7 +199,7 @@
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__init_end = .;
__bss_start = .; /* BSS */
- *(.bss.page_aligned)
+ *(.bss.k.page_aligned)
*(.bss)
. = ALIGN(4);
__bss_stop = .;
--- 0.org/arch/x86/kernel/vmlinux_64.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/kernel/vmlinux_64.lds.S Wed Jul 2 00:47:00 2008
@@ -28,7 +28,7 @@
_text = .; /* Text and read-only data */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
/* First the code that has to be first for bootstrapping */
- *(.text.head)
+ *(.head.text)
_stext = .;
/* Then the rest */
TEXT_TEXT
@@ -71,17 +71,17 @@
. = ALIGN(PAGE_SIZE);
. = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : AT(ADDR(.cacheline_aligned.data) - LOAD_OFFSET) {
+ *(.cacheline_aligned.data)
}
. = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES);
- .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
- *(.data.read_mostly)
+ .read_mostly.data : AT(ADDR(.read_mostly.data) - LOAD_OFFSET) {
+ *(.read_mostly.data)
}
#define VSYSCALL_ADDR (-10*1024*1024)
-#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
-#define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
+#define VSYSCALL_PHYS_ADDR ((LOADADDR(.read_mostly.data) + SIZEOF(.read_mostly.data) + 4095) & ~(4095))
+#define VSYSCALL_VIRT_ADDR ((ADDR(.read_mostly.data) + SIZEOF(.read_mostly.data) + 4095) & ~(4095))
#define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
#define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
@@ -130,13 +130,13 @@
#undef VVIRT
. = ALIGN(THREAD_SIZE); /* init_task */
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- *(.data.init_task)
+ .init_task.data : AT(ADDR(.init_task.data) - LOAD_OFFSET) {
+ *(.init_task.data)
}:data.init
. = ALIGN(PAGE_SIZE);
- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
- *(.data.page_aligned)
+ .page_aligned.data : AT(ADDR(.page_aligned.data) - LOAD_OFFSET) {
+ *(.page_aligned.data)
}
/* might get freed after init */
@@ -223,13 +223,13 @@
. = ALIGN(PAGE_SIZE);
__nosave_begin = .;
- .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) }
+ .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.nosave.data) }
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
__bss_start = .; /* BSS */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
- *(.bss.page_aligned)
+ *(.bss.k.page_aligned)
*(.bss)
}
__bss_stop = .;
--- 0.org/arch/x86/mm/ioremap.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/x86/mm/ioremap.c Wed Jul 2 00:47:00 2008
@@ -395,7 +395,7 @@
static __initdata int after_paging_init;
static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)]
- __section(.bss.page_aligned);
+ __section(.bss.k.page_aligned);
static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
{
--- 0.org/include/asm-x86/cache.h Wed Jul 2 00:40:51 2008
+++ 1.fixname/include/asm-x86/cache.h Wed Jul 2 00:46:09 2008
@@ -5,7 +5,7 @@
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#ifdef CONFIG_X86_VSMP
/* vSMP Internode cacheline shift */
@@ -13,7 +13,7 @@
#ifdef CONFIG_SMP
#define __cacheline_aligned_in_smp \
__attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
- __attribute__((__section__(".data.page_aligned")))
+ __attribute__((__section__(".page_aligned.data")))
#endif
#endif
^ permalink raw reply
* [PATCH 21/23] make section names compatible with -ffunction-sections -fdata-sections: v850
From: Denys Vlasenko @ 2008-07-02 0:42 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes v850 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/v850/kernel/init_task.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/v850/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -44,5 +44,5 @@
* "init_task" linker map entry.
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
--- 0.org/arch/v850/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/v850/kernel/vmlinux.lds.S Wed Jul 2 00:46:26 2008
@@ -95,8 +95,8 @@
TEXT_TEXT \
SCHED_TEXT \
*(.exit.text) /* 2.5 convention */ \
- *(.text.exit) /* 2.4 convention */ \
- *(.text.lock) \
+ *(.exit.text) /* 2.4 convention */ \
+ *(.lock.text) \
*(.exitcall.exit) \
__real_etext = . ; /* There may be data after here. */ \
RODATA_CONTENTS \
@@ -115,11 +115,11 @@
__sdata = . ; \
DATA_DATA \
EXIT_DATA /* 2.5 convention */ \
- *(.data.exit) /* 2.4 convention */ \
+ *(.exit.data) /* 2.4 convention */ \
. = ALIGN (16) ; \
- *(.data.cacheline_aligned) \
+ *(.cacheline_aligned.data) \
. = ALIGN (0x2000) ; \
- *(.data.init_task) \
+ *(.init_task.data) \
. = ALIGN (0x2000) ; \
__edata = . ;
@@ -160,8 +160,8 @@
INIT_TEXT /* 2.5 convention */ \
__einittext = .; \
INIT_DATA \
- *(.text.init) /* 2.4 convention */ \
- *(.data.init) \
+ *(.init.text) /* 2.4 convention */ \
+ *(.init.data) \
INITCALL_CONTENTS \
INITRAMFS_CONTENTS
@@ -171,7 +171,7 @@
. = ALIGN (4096) ; \
__init_start = . ; \
INIT_DATA /* 2.5 convention */ \
- *(.data.init) /* 2.4 convention */ \
+ *(.init.data) /* 2.4 convention */ \
__init_end = . ; \
. = ALIGN (4096) ;
@@ -181,7 +181,7 @@
_sinittext = .; \
INIT_TEXT /* 2.5 convention */ \
_einittext = .; \
- *(.text.init) /* 2.4 convention */ \
+ *(.init.text) /* 2.4 convention */ \
INITCALL_CONTENTS \
INITRAMFS_CONTENTS
^ permalink raw reply
* [PATCH 20/23] make section names compatible with -ffunction-sections -fdata-sections: um
From: Denys Vlasenko @ 2008-07-02 0:41 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes User Mode Linux.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/um/kernel/dyn.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/um/kernel/dyn.lds.S Wed Jul 2 00:45:57 2008
@@ -97,9 +97,9 @@
.fini_array : { *(.fini_array) }
.data : {
. = ALIGN(KERNEL_STACK_SIZE); /* init_task */
- *(.data.init_task)
+ *(.init_task.data)
. = ALIGN(KERNEL_STACK_SIZE);
- *(.data.init_irqstack)
+ *(.init_irqstack.data)
DATA_DATA
*(.data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
--- 0.org/arch/um/kernel/init_task.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/um/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -35,9 +35,9 @@
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
union thread_union cpu0_irqstack
- __attribute__((__section__(".data.init_irqstack"))) =
+ __attribute__((__section__(".init_irqstack.data"))) =
{ INIT_THREAD_INFO(init_task) };
--- 0.org/arch/um/kernel/uml.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/um/kernel/uml.lds.S Wed Jul 2 00:45:57 2008
@@ -53,9 +53,9 @@
.data :
{
. = ALIGN(KERNEL_STACK_SIZE); /* init_task */
- *(.data.init_task)
+ *(.init_task.data)
. = ALIGN(KERNEL_STACK_SIZE);
- *(.data.init_irqstack)
+ *(.init_irqstack.data)
DATA_DATA
*(.gnu.linkonce.d*)
CONSTRUCTORS
--- 0.org/include/asm-um/common.lds.S Wed Jul 2 00:40:51 2008
+++ 1.fixname/include/asm-um/common.lds.S Wed Jul 2 00:45:39 2008
@@ -49,9 +49,9 @@
}
. = ALIGN(32);
- .data.percpu : {
+ .percpu.data : {
__per_cpu_start = . ;
- *(.data.percpu)
+ *(.percpu.data)
__per_cpu_end = . ;
}
^ permalink raw reply
* [PATCH 19/23] make section names compatible with -ffunction-sections -fdata-sections: sparc
From: Denys Vlasenko @ 2008-07-02 0:41 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes sparc architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/sparc/boot/btfixupprep.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sparc/boot/btfixupprep.c Wed Jul 2 00:45:57 2008
@@ -171,7 +171,7 @@
}
} else if (buffer[nbase+4] != '_')
continue;
- if (!strcmp (sect, ".text.exit"))
+ if (!strcmp (sect, ".exit.text"))
continue;
if (strcmp (sect, ".text") &&
strcmp (sect, ".init.text") &&
@@ -325,7 +325,7 @@
(*rr)->next = NULL;
}
printf("! Generated by btfixupprep. Do not edit.\n\n");
- printf("\t.section\t\".data.init\",#alloc,#write\n\t.align\t4\n\n");
+ printf("\t.section\t\".init.data\",#alloc,#write\n\t.align\t4\n\n");
printf("\t.global\t___btfixup_start\n___btfixup_start:\n\n");
for (i = 0; i < last; i++) {
f = array + i;
--- 0.org/arch/sparc/kernel/head.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sparc/kernel/head.S Wed Jul 2 00:44:28 2008
@@ -742,7 +742,7 @@
nop
/* The code above should be at beginning and we have to take care about
- * short jumps, as branching to .text.init section from .text is usually
+ * short jumps, as branching to .init.text section from .text is usually
* impossible */
__INIT
/* Acquire boot time privileged register values, this will help debugging.
--- 0.org/arch/sparc/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sparc/kernel/vmlinux.lds.S Wed Jul 2 00:45:51 2008
@@ -86,12 +86,12 @@
. = ALIGN(PAGE_SIZE);
__init_end = .;
. = ALIGN(32);
- .data.cacheline_aligned : {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : {
+ *(.cacheline_aligned.data)
}
. = ALIGN(32);
- .data.read_mostly : {
- *(.data.read_mostly)
+ .read_mostly.data : {
+ *(.read_mostly.data)
}
__bss_start = .;
--- 0.org/arch/sparc64/kernel/head.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sparc64/kernel/head.S Wed Jul 2 00:44:28 2008
@@ -466,7 +466,7 @@
jmpl %g2 + %g0, %g0
nop
- .section .text.init.refok
+ .section .init.refok.text
sun4u_init:
BRANCH_IF_SUN4V(g1, sun4v_init)
--- 0.org/arch/sparc64/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sparc64/kernel/vmlinux.lds.S Wed Jul 2 00:45:51 2008
@@ -32,12 +32,12 @@
*(.data1)
}
. = ALIGN(64);
- .data.cacheline_aligned : {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : {
+ *(.cacheline_aligned.data)
}
. = ALIGN(64);
- .data.read_mostly : {
- *(.data.read_mostly)
+ .read_mostly.data : {
+ *(.read_mostly.data)
}
_edata = .;
PROVIDE (edata = .);
--- 0.org/include/asm-sparc/cache.h Wed Jul 2 00:40:51 2008
+++ 1.fixname/include/asm-sparc/cache.h Wed Jul 2 00:45:45 2008
@@ -19,7 +19,7 @@
#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#ifdef CONFIG_SPARC32
#include <asm/asi.h>
^ permalink raw reply
* [PATCH 18/23] make section names compatible with -ffunction-sections -fdata-sections: sh
From: Denys Vlasenko @ 2008-07-02 0:41 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes sh architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/sh/kernel/cpu/sh5/entry.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/cpu/sh5/entry.S Wed Jul 2 00:44:28 2008
@@ -2063,10 +2063,10 @@
/*
- * --- .text.init Section
+ * --- .init.text Section
*/
- .section .text.init, "ax"
+ .section .init.text, "ax"
/*
* void trap_init (void)
--- 0.org/arch/sh/kernel/head_32.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/head_32.S Wed Jul 2 00:44:22 2008
@@ -40,7 +40,7 @@
1:
.skip PAGE_SIZE - empty_zero_page - 1b
- .section .text.head, "ax"
+ .section .head.text, "ax"
/*
* Condition at the entry of _stext:
--- 0.org/arch/sh/kernel/head_64.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/head_64.S Wed Jul 2 00:44:22 2008
@@ -110,7 +110,7 @@
fpu_in_use: .quad 0
- .section .text.head, "ax"
+ .section .head.text, "ax"
.balign L1_CACHE_BYTES
/*
* Condition at the entry of __stext:
--- 0.org/arch/sh/kernel/init_task.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -22,7 +22,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/sh/kernel/irq.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/irq.c Wed Jul 2 00:47:00 2008
@@ -158,10 +158,10 @@
#ifdef CONFIG_IRQSTACKS
static char softirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+ __attribute__((__section__(".bss.k.page_aligned")));
static char hardirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+ __attribute__((__section__(".bss.k.page_aligned")));
/*
* allocate per-cpu stacks for hardirq and for softirq processing
--- 0.org/arch/sh/kernel/vmlinux_32.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/vmlinux_32.lds.S Wed Jul 2 00:47:00 2008
@@ -28,7 +28,7 @@
} = 0
.text : {
- *(.text.head)
+ *(.head.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -59,19 +59,19 @@
. = ALIGN(THREAD_SIZE);
.data : { /* Data */
- *(.data.init_task)
+ *(.init_task.data)
. = ALIGN(L1_CACHE_BYTES);
- *(.data.cacheline_aligned)
+ *(.cacheline_aligned.data)
. = ALIGN(L1_CACHE_BYTES);
- *(.data.read_mostly)
+ *(.read_mostly.data)
. = ALIGN(PAGE_SIZE);
- *(.data.page_aligned)
+ *(.page_aligned.data)
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
@@ -129,7 +129,7 @@
.bss : {
__init_end = .;
__bss_start = .; /* BSS */
- *(.bss.page_aligned)
+ *(.bss.k.page_aligned)
*(.bss)
*(COMMON)
. = ALIGN(4);
--- 0.org/arch/sh/kernel/vmlinux_64.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/sh/kernel/vmlinux_64.lds.S Wed Jul 2 00:47:00 2008
@@ -42,7 +42,7 @@
} = 0
.text : C_PHYS(.text) {
- *(.text.head)
+ *(.head.text)
TEXT_TEXT
*(.text64)
*(.text..SHmedia32)
@@ -71,19 +71,19 @@
. = ALIGN(THREAD_SIZE);
.data : C_PHYS(.data) { /* Data */
- *(.data.init_task)
+ *(.init_task.data)
. = ALIGN(L1_CACHE_BYTES);
- *(.data.cacheline_aligned)
+ *(.cacheline_aligned.data)
. = ALIGN(L1_CACHE_BYTES);
- *(.data.read_mostly)
+ *(.read_mostly.data)
. = ALIGN(PAGE_SIZE);
- *(.data.page_aligned)
+ *(.page_aligned.data)
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
@@ -141,7 +141,7 @@
.bss : C_PHYS(.bss) {
__init_end = .;
__bss_start = .; /* BSS */
- *(.bss.page_aligned)
+ *(.bss.k.page_aligned)
*(.bss)
*(COMMON)
. = ALIGN(4);
--- 0.org/include/asm-sh/cache.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-sh/cache.h Wed Jul 2 00:45:45 2008
@@ -14,7 +14,7 @@
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#ifndef __ASSEMBLY__
struct cache_info {
^ permalink raw reply
* [PATCH 17/23] make section names compatible with -ffunction-sections -fdata-sections: s390
From: Denys Vlasenko @ 2008-07-02 0:40 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes s390 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/s390/kernel/head.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/s390/kernel/head.S Wed Jul 2 00:44:22 2008
@@ -35,7 +35,7 @@
#define ARCH_OFFSET 0
#endif
-.section ".text.head","ax"
+.section ".head.text","ax"
#ifndef CONFIG_IPL
.org 0
.long 0x00080000,0x80000000+startup # Just a restart PSW
--- 0.org/arch/s390/kernel/init_task.c Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/s390/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -31,7 +31,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/s390/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008
+++ 1.fixname/arch/s390/kernel/vmlinux.lds.S Wed Jul 2 00:46:32 2008
@@ -28,7 +28,7 @@
. = 0x00000000;
.text : {
_text = .; /* Text and read-only data */
- *(.text.head)
+ *(.head.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -66,30 +66,30 @@
. = ALIGN(PAGE_SIZE);
.data_nosave : {
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
}
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
. = ALIGN(PAGE_SIZE);
- .data.page_aligned : {
- *(.data.idt)
+ .page_aligned.data : {
+ *(.idt.data)
}
. = ALIGN(0x100);
- .data.cacheline_aligned : {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : {
+ *(.cacheline_aligned.data)
}
. = ALIGN(0x100);
- .data.read_mostly : {
- *(.data.read_mostly)
+ .read_mostly.data : {
+ *(.read_mostly.data)
}
_edata = .; /* End of data section */
. = ALIGN(2 * PAGE_SIZE); /* init_task */
- .data.init_task : {
- *(.data.init_task)
+ .init_task.data : {
+ *(.init_task.data)
}
/* will be freed after init */
--- 0.org/include/asm-s390/cache.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-s390/cache.h Wed Jul 2 00:45:45 2008
@@ -14,6 +14,6 @@
#define L1_CACHE_BYTES 256
#define L1_CACHE_SHIFT 8
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#endif
^ permalink raw reply
* [PATCH 16/23] make section names compatible with -ffunction-sections -fdata-sections: ppc
From: Denys Vlasenko @ 2008-07-02 0:40 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes ppc architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/ppc/boot/ld.script Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/ppc/boot/ld.script Wed Jul 2 00:46:50 2008
@@ -41,7 +41,7 @@
{
*(.data)
*(.data1)
- *(.data.boot)
+ *(.boot.data)
*(.sdata)
*(.sdata2)
*(.got.plt) *(.got)
--- 0.org/arch/ppc/boot/simple/misc-embedded.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/ppc/boot/simple/misc-embedded.c Wed Jul 2 00:46:50 2008
@@ -60,7 +60,7 @@
/* We need to make sure that this is before the images to ensure
* that it's in a mapped location. - Tom */
-bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot")));
+bd_t hold_resid_buf __attribute__ ((__section__ (".boot.data")));
bd_t *hold_residual = &hold_resid_buf;
extern unsigned long serial_init(int chan, bd_t *bp);
--- 0.org/arch/ppc/boot/simple/openbios.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/ppc/boot/simple/openbios.c Wed Jul 2 00:46:50 2008
@@ -41,7 +41,7 @@
/* We need to make sure that this is before the images to ensure
* that it's in a mapped location. */
-bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot")));
+bd_t hold_resid_buf __attribute__ ((__section__ (".boot.data")));
bd_t *hold_residual = &hold_resid_buf;
typedef struct openbios_board_info {
--- 0.org/arch/ppc/boot/simple/pibs.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/ppc/boot/simple/pibs.c Wed Jul 2 00:46:50 2008
@@ -16,7 +16,7 @@
/* We need to make sure that this is before the images to ensure
* that it's in a mapped location. - Tom */
-bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot")));
+bd_t hold_resid_buf __attribute__ ((__section__ (".boot.data")));
bd_t *hold_residual = &hold_resid_buf;
/* String functions lifted from lib/vsprintf.c and lib/ctype.c */
--- 0.org/arch/ppc/kernel/vmlinux.lds.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/ppc/kernel/vmlinux.lds.S Wed Jul 2 00:46:03 2008
@@ -78,18 +78,18 @@
. = ALIGN(4096);
__nosave_begin = .;
- .data_nosave : { *(.data.nosave) }
+ .data_nosave : { *(.nosave.data) }
. = ALIGN(4096);
__nosave_end = .;
. = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ .cacheline_aligned.data : { *(.cacheline_aligned.data) }
_edata = .;
PROVIDE (edata = .);
. = ALIGN(8192);
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
NOTES
^ permalink raw reply
* [PATCH 15/23] make section names compatible with -ffunction-sections -fdata-sections: powerpc
From: Denys Vlasenko @ 2008-07-02 0:39 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes powerpc architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/powerpc/kernel/head_32.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_32.S Wed Jul 2 00:44:22 2008
@@ -49,7 +49,7 @@
mtspr SPRN_DBAT##n##L,RB; \
1:
- .section .text.head, "ax"
+ .section .head.text, "ax"
.stabs "arch/powerpc/kernel/",N_SO,0,0,0f
.stabs "head_32.S",N_SO,0,0,0f
0:
--- 0.org/arch/powerpc/kernel/head_40x.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_40x.S Wed Jul 2 00:44:22 2008
@@ -52,7 +52,7 @@
*
* This is all going to change RSN when we add bi_recs....... -- Dan
*/
- .section .text.head, "ax"
+ .section .head.text, "ax"
_ENTRY(_stext);
_ENTRY(_start);
--- 0.org/arch/powerpc/kernel/head_44x.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_44x.S Wed Jul 2 00:44:22 2008
@@ -50,7 +50,7 @@
* r7 - End of kernel command line string
*
*/
- .section .text.head, "ax"
+ .section .head.text, "ax"
_ENTRY(_stext);
_ENTRY(_start);
/*
--- 0.org/arch/powerpc/kernel/head_8xx.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_8xx.S Wed Jul 2 00:44:22 2008
@@ -38,7 +38,7 @@
#else
#define DO_8xx_CPU6(val, reg)
#endif
- .section .text.head, "ax"
+ .section .head.text, "ax"
_ENTRY(_stext);
_ENTRY(_start);
--- 0.org/arch/powerpc/kernel/head_fsl_booke.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_fsl_booke.S Wed Jul 2 00:44:22 2008
@@ -52,7 +52,7 @@
* r7 - End of kernel command line string
*
*/
- .section .text.head, "ax"
+ .section .head.text, "ax"
_ENTRY(_stext);
_ENTRY(_start);
/*
--- 0.org/arch/powerpc/kernel/init_task.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -22,7 +22,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/powerpc/kernel/machine_kexec_64.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/machine_kexec_64.c Wed Jul 2 00:45:57 2008
@@ -250,7 +250,7 @@
* current, but that audit has not been performed.
*/
union thread_union kexec_stack
- __attribute__((__section__(".data.init_task"))) = { };
+ __attribute__((__section__(".init_task.data"))) = { };
/* Our assembly helper, in kexec_stub.S */
extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
--- 0.org/arch/powerpc/kernel/vdso.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso.c Wed Jul 2 00:46:09 2008
@@ -74,7 +74,7 @@
static union {
struct vdso_data data;
u8 page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __attribute__((__section__(".page_aligned.data")));
struct vdso_data *vdso_data = &vdso_data_store.data;
/* Format of the patch table */
--- 0.org/arch/powerpc/kernel/vdso32/vdso32_wrapper.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso32/vdso32_wrapper.S Wed Jul 2 00:46:09 2008
@@ -1,7 +1,7 @@
#include <linux/init.h>
#include <asm/page.h>
- .section ".data.page_aligned"
+ .section ".page_aligned.data"
.globl vdso32_start, vdso32_end
.balign PAGE_SIZE
--- 0.org/arch/powerpc/kernel/vdso64/vdso64_wrapper.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso64/vdso64_wrapper.S Wed Jul 2 00:46:09 2008
@@ -1,7 +1,7 @@
#include <linux/init.h>
#include <asm/page.h>
- .section ".data.page_aligned"
+ .section ".page_aligned.data"
.globl vdso64_start, vdso64_end
.balign PAGE_SIZE
--- 0.org/arch/powerpc/kernel/vmlinux.lds.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vmlinux.lds.S Wed Jul 2 00:54:28 2008
@@ -33,9 +33,9 @@
/* Text and gots */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
ALIGN_FUNCTION();
- *(.text.head)
+ *(.head.text)
_text = .;
- *(.text .fixup .text.init.refok .exit.text.refok)
+ *(.text .fixup .init.refok.text .exit.refok.text)
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
@@ -144,10 +144,10 @@
}
#endif
. = ALIGN(PAGE_SIZE);
- .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
+ .percpu.data : AT(ADDR(.percpu.data) - LOAD_OFFSET) {
__per_cpu_start = .;
- *(.data.percpu)
- *(.data.percpu.shared_aligned)
+ *(.percpu.data)
+ *(.percpu.shared_aligned.data)
__per_cpu_end = .;
}
@@ -204,28 +204,28 @@
#else
. = ALIGN(16384);
#endif
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- *(.data.init_task)
+ .init_task.data : AT(ADDR(.init_task.data) - LOAD_OFFSET) {
+ *(.init_task.data)
}
. = ALIGN(PAGE_SIZE);
- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
- *(.data.page_aligned)
+ .page_aligned.data : AT(ADDR(.page_aligned.data) - LOAD_OFFSET) {
+ *(.page_aligned.data)
}
- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : AT(ADDR(.cacheline_aligned.data) - LOAD_OFFSET) {
+ *(.cacheline_aligned.data)
}
. = ALIGN(L1_CACHE_BYTES);
- .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
- *(.data.read_mostly)
+ .read_mostly.data : AT(ADDR(.read_mostly.data) - LOAD_OFFSET) {
+ *(.read_mostly.data)
}
. = ALIGN(PAGE_SIZE);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
}
--- 0.org/include/asm-powerpc/cache.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/cache.h Wed Jul 2 00:45:45 2008
@@ -35,7 +35,7 @@
#endif /* __powerpc64__ && ! __ASSEMBLY__ */
#if !defined(__ASSEMBLY__)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#endif
#endif /* __KERNEL__ */
--- 0.org/include/asm-powerpc/page_64.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/page_64.h Wed Jul 2 00:46:09 2008
@@ -150,7 +150,7 @@
#else
#define __page_aligned \
__attribute__((__aligned__(PAGE_SIZE), \
- __section__(".data.page_aligned")))
+ __section__(".page_aligned.data")))
#endif
#define VM_DATA_DEFAULT_FLAGS \
--- 0.org/include/asm-powerpc/ppc_asm.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/ppc_asm.h Wed Jul 2 00:44:28 2008
@@ -156,7 +156,7 @@
GLUE(.,name):
#define _INIT_GLOBAL(name) \
- .section ".text.init.refok"; \
+ .section ".init.refok.text"; \
.align 2 ; \
.globl name; \
.globl GLUE(.,name); \
@@ -196,7 +196,7 @@
GLUE(.,name):
#define _INIT_STATIC(name) \
- .section ".text.init.refok"; \
+ .section ".init.refok.text"; \
.align 2 ; \
.section ".opd","aw"; \
name: \
^ permalink raw reply
* [PATCH 14/23] make section names compatible with -ffunction-sections -fdata-sections: parisc
From: Denys Vlasenko @ 2008-07-02 0:39 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes parisc architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/parisc/kernel/head.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/parisc/kernel/head.S Wed Jul 2 00:45:45 2008
@@ -345,7 +345,7 @@
ENDPROC(stext)
#ifndef CONFIG_64BIT
- .section .data.read_mostly
+ .section .read_mostly.data
.align 4
.export $global$,data
--- 0.org/arch/parisc/kernel/init_task.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/parisc/kernel/init_task.c Wed Jul 2 00:46:55 2008
@@ -49,7 +49,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) =
+ __attribute__((aligned(128))) __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
#if PT_NLEVELS == 3
@@ -58,11 +58,11 @@
* guarantee that global objects will be laid out in memory in the same order
* as the order of declaration, so put these in different sections and use
* the linker script to order them. */
-pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data.vm0.pmd"), aligned(PAGE_SIZE)));
+pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".vm0.pmd.data"), aligned(PAGE_SIZE)));
#endif
-pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data.vm0.pgd"), aligned(PAGE_SIZE)));
-pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data.vm0.pte"), aligned(PAGE_SIZE)));
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".vm0.pgd.data"), aligned(PAGE_SIZE)));
+pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".vm0.pte.data"), aligned(PAGE_SIZE)));
/*
* Initial task structure.
--- 0.org/arch/parisc/kernel/vmlinux.lds.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/parisc/kernel/vmlinux.lds.S Wed Jul 2 01:02:35 2008
@@ -54,10 +54,10 @@
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
- *(.text.do_softirq)
- *(.text.sys_exit)
- *(.text.do_sigaltstack)
- *(.text.do_fork)
+ *(.do_softirq.text)
+ *(.sys_exit.text)
+ *(.do_sigaltstack.text)
+ *(.do_fork.text)
*(.text.*)
*(.fixup)
*(.lock.text) /* out-of-line lock text */
@@ -95,8 +95,8 @@
/* rarely changed data like cpu maps */
. = ALIGN(16);
- .data.read_mostly : {
- *(.data.read_mostly)
+ .read_mostly.data : {
+ *(.read_mostly.data)
}
. = ALIGN(L1_CACHE_BYTES);
@@ -107,14 +107,14 @@
}
. = ALIGN(L1_CACHE_BYTES);
- .data.cacheline_aligned : {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : {
+ *(.cacheline_aligned.data)
}
/* PA-RISC locks requires 16-byte alignment */
. = ALIGN(16);
- .data.lock_aligned : {
- *(.data.lock_aligned)
+ .lock_aligned.data : {
+ *(.lock_aligned.data)
}
/* nosave data is really only used for software suspend...it's here
@@ -123,7 +123,7 @@
. = ALIGN(PAGE_SIZE);
__nosave_begin = .;
.data_nosave : {
- *(.data.nosave)
+ *(.nosave.data)
}
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
@@ -135,10 +135,10 @@
__bss_start = .;
/* page table entries need to be PAGE_SIZE aligned */
. = ALIGN(PAGE_SIZE);
- .data.vmpages : {
- *(.data.vm0.pmd)
- *(.data.vm0.pgd)
- *(.data.vm0.pte)
+ .data.vmpages : { /* TODO: rename .vmpages.data? */
+ *(.vm0.pmd.data)
+ *(.vm0.pgd.data)
+ *(.vm0.pte.data)
}
.bss : {
*(.bss)
@@ -150,8 +150,8 @@
/* assembler code expects init_task to be 16k aligned */
. = ALIGN(16384);
/* init_task */
- .data.init_task : {
- *(.data.init_task)
+ .init_task.data : {
+ *(.init_task.data)
}
#ifdef CONFIG_64BIT
--- 0.org/include/asm-parisc/cache.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-parisc/cache.h Wed Jul 2 00:45:45 2008
@@ -28,7 +28,7 @@
#define SMP_CACHE_BYTES L1_CACHE_BYTES
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
void parisc_cache_init(void); /* initializes cache-flushing */
void disable_sr_hashing_asm(int); /* low level support for above */
--- 0.org/include/asm-parisc/system.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-parisc/system.h Wed Jul 2 00:46:14 2008
@@ -174,7 +174,7 @@
})
#ifdef CONFIG_SMP
-# define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
+# define __lock_aligned __attribute__((__section__(".lock_aligned.data")))
#endif
#define arch_align_stack(x) (x)
^ permalink raw reply
* [PATCH 13/23] make section names compatible with -ffunction-sections -fdata-sections: mn10300
From: Denys Vlasenko @ 2008-07-02 0:38 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes mn10300 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/mn10300/kernel/head.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mn10300/kernel/head.S Wed Jul 2 00:44:22 2008
@@ -19,7 +19,7 @@
#include <asm/param.h>
#include <asm/unit/serial.h>
- .section .text.head,"ax"
+ .section .head.text,"ax"
###############################################################################
#
--- 0.org/arch/mn10300/kernel/init_task.c Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mn10300/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -32,7 +32,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/mn10300/kernel/vmlinux.lds.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mn10300/kernel/vmlinux.lds.S Wed Jul 2 00:47:00 2008
@@ -27,7 +27,7 @@
_text = .; /* Text and read-only data */
.text : {
*(
- .text.head
+ .head.text
.text
)
TEXT_TEXT
@@ -57,25 +57,25 @@
. = ALIGN(4096);
__nosave_begin = .;
- .data_nosave : { *(.data.nosave) }
+ .data_nosave : { *(.nosave.data) }
. = ALIGN(4096);
__nosave_end = .;
. = ALIGN(4096);
- .data.page_aligned : { *(.data.idt) }
+ .page_aligned.data : { *(.idt.data) }
. = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ .cacheline_aligned.data : { *(.cacheline_aligned.data) }
/* rarely changed data like cpu maps */
. = ALIGN(32);
- .data.read_mostly : AT(ADDR(.data.read_mostly)) {
- *(.data.read_mostly)
+ .read_mostly.data : AT(ADDR(.read_mostly.data)) {
+ *(.read_mostly.data)
_edata = .; /* End of data section */
}
. = ALIGN(THREAD_SIZE); /* init_task */
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
/* might get freed after init */
. = ALIGN(4096);
@@ -128,7 +128,7 @@
. = ALIGN(32);
__per_cpu_start = .;
- .data.percpu : { *(.data.percpu) }
+ .percpu.data : { *(.percpu.data) }
__per_cpu_end = .;
. = ALIGN(4096);
__init_end = .;
@@ -136,7 +136,7 @@
__bss_start = .; /* BSS */
.bss : {
- *(.bss.page_aligned)
+ *(.bss.k.page_aligned)
*(.bss)
}
. = ALIGN(4);
^ permalink raw reply
* [PATCH 12/23] make section names compatible with -ffunction-sections -fdata-sections: m68k
From: Denys Vlasenko @ 2008-07-02 0:38 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes m68k architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/m68k/kernel/head.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68k/kernel/head.S Wed Jul 2 00:44:22 2008
@@ -577,7 +577,7 @@
#endif
.endm
-.section ".text.head","ax"
+.section ".head.text","ax"
ENTRY(_stext)
/*
* Version numbers of the bootinfo interface
--- 0.org/arch/m68k/kernel/process.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68k/kernel/process.c Wed Jul 2 00:45:57 2008
@@ -48,7 +48,7 @@
EXPORT_SYMBOL(init_mm);
union thread_union init_thread_union
-__attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
+__attribute__((section(".init_task.data"), aligned(THREAD_SIZE)))
= { INIT_THREAD_INFO(init_task) };
/* initial task structure */
--- 0.org/arch/m68k/kernel/sun3-head.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68k/kernel/sun3-head.S Wed Jul 2 00:44:22 2008
@@ -29,7 +29,7 @@
.globl kernel_pg_dir
.equ kernel_pg_dir,kernel_pmd_table
- .section .text.head
+ .section .head.text
ENTRY(_stext)
ENTRY(_start)
--- 0.org/arch/m68k/kernel/vmlinux-std.lds Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68k/kernel/vmlinux-std.lds Wed Jul 2 00:45:57 2008
@@ -11,7 +11,7 @@
. = 0x1000;
_text = .; /* Text and read-only data */
.text : {
- *(.text.head)
+ *(.head.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -36,7 +36,7 @@
.bss : { *(.bss) } /* BSS */
. = ALIGN(16);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data
+ .cacheline_aligned.data : { *(.cacheline_aligned.data) } :data
_edata = .; /* End of data section */
@@ -76,7 +76,7 @@
. = ALIGN(8192);
__init_end = .;
- .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */
+ .init_task.data : { *(.init_task.data) } /* The initial task and kernel stack */
_end = . ;
--- 0.org/arch/m68k/kernel/vmlinux-sun3.lds Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68k/kernel/vmlinux-sun3.lds Wed Jul 2 00:45:57 2008
@@ -11,7 +11,7 @@
. = 0xE002000;
_text = .; /* Text and read-only data */
.text : {
- *(.text.head)
+ *(.head.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -68,7 +68,7 @@
#endif
. = ALIGN(8192);
__init_end = .;
- .data.init.task : { *(.data.init_task) }
+ .init.task.data : { *(.init_task.data) }
.bss : { *(.bss) } /* BSS */
--- 0.org/arch/m68knommu/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68knommu/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -37,6 +37,6 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
--- 0.org/arch/m68knommu/kernel/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68knommu/kernel/vmlinux.lds.S Wed Jul 2 00:45:57 2008
@@ -55,7 +55,7 @@
.romvec : {
__rom_start = . ;
_romvec = .;
- *(.data.initvect)
+ *(.initvect.data)
} > romvec
#endif
@@ -65,7 +65,7 @@
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
- *(.text.lock)
+ *(.lock.text)
. = ALIGN(16); /* Exception table */
__start___ex_table = .;
@@ -147,7 +147,7 @@
_sdata = . ;
DATA_DATA
. = ALIGN(8192) ;
- *(.data.init_task)
+ *(.init_task.data)
_edata = . ;
} > DATA
--- 0.org/arch/m68knommu/platform/68360/head-ram.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68knommu/platform/68360/head-ram.S Wed Jul 2 00:45:57 2008
@@ -280,7 +280,7 @@
* and then overwritten as needed.
*/
-.section ".data.initvect","awx"
+.section ".initvect.data","awx"
.long RAMEND /* Reset: Initial Stack Pointer - 0. */
.long _start /* Reset: Initial Program Counter - 1. */
.long buserr /* Bus Error - 2. */
--- 0.org/arch/m68knommu/platform/68360/head-rom.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m68knommu/platform/68360/head-rom.S Wed Jul 2 00:45:57 2008
@@ -291,7 +291,7 @@
* and then overwritten as needed.
*/
-.section ".data.initvect","awx"
+.section ".initvect.data","awx"
.long RAMEND /* Reset: Initial Stack Pointer - 0. */
.long _start /* Reset: Initial Program Counter - 1. */
.long buserr /* Bus Error - 2. */
^ permalink raw reply
* [PATCH 11/23] make section names compatible with -ffunction-sections -fdata-sections: mips
From: Denys Vlasenko @ 2008-07-02 0:37 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes mips architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/mips/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/mips/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -27,7 +27,7 @@
* The things we do for performance..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"),
+ __attribute__((__section__(".init_task.data"),
__aligned__(THREAD_SIZE))) =
{ INIT_THREAD_INFO(init_task) };
--- 0.org/arch/mips/kernel/vmlinux.lds.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mips/kernel/vmlinux.lds.S Wed Jul 2 00:46:03 2008
@@ -76,7 +76,7 @@
* object file alignment. Using 32768
*/
. = ALIGN(_PAGE_SIZE);
- *(.data.init_task)
+ *(.init_task.data)
DATA_DATA
CONSTRUCTORS
@@ -98,14 +98,14 @@
. = ALIGN(_PAGE_SIZE);
.data_nosave : {
__nosave_begin = .;
- *(.data.nosave)
+ *(.nosave.data)
}
. = ALIGN(_PAGE_SIZE);
__nosave_end = .;
. = ALIGN(32);
- .data.cacheline_aligned : {
- *(.data.cacheline_aligned)
+ .cacheline_aligned.data : {
+ *(.cacheline_aligned.data)
}
_edata = .; /* End of data section */
--- 0.org/arch/mips/lasat/image/head.S Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mips/lasat/image/head.S Wed Jul 2 00:44:34 2008
@@ -1,7 +1,7 @@
#include <asm/lasat/head.h>
.text
- .section .text.start, "ax"
+ .section .start.text, "ax"
.set noreorder
.set mips3
--- 0.org/arch/mips/lasat/image/romscript.normal Wed Jul 2 00:40:41 2008
+++ 1.fixname/arch/mips/lasat/image/romscript.normal Wed Jul 2 00:44:34 2008
@@ -4,7 +4,7 @@
{
.text :
{
- *(.text.start)
+ *(.start.text)
}
/* Data in ROM */
^ permalink raw reply
* [PATCH 10/23] make section names compatible with -ffunction-sections -fdata-sections: m32r
From: Denys Vlasenko @ 2008-07-02 0:37 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes m32r architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/m32r/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m32r/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -26,7 +26,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/m32r/kernel/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/m32r/kernel/vmlinux.lds.S Wed Jul 2 00:46:03 2008
@@ -56,17 +56,17 @@
. = ALIGN(4096);
__nosave_begin = .;
- .data_nosave : { *(.data.nosave) }
+ .data_nosave : { *(.nosave.data) }
. = ALIGN(4096);
__nosave_end = .;
. = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ .cacheline_aligned.data : { *(.cacheline_aligned.data) }
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
/* will be freed after init */
. = ALIGN(4096); /* Init code and data */
^ permalink raw reply
* [PATCH 9/23] make section names compatible with -ffunction-sections -fdata-sections: ia64
From: Denys Vlasenko @ 2008-07-02 0:36 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes ia64 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/ia64/kernel/Makefile Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/Makefile Wed Jul 2 00:46:44 2008
@@ -66,7 +66,7 @@
$(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE
$(call if_changed,gate)
-# gate-data.o contains the gate DSO image as data in section .data.gate.
+# gate-data.o contains the gate DSO image as data in section .gate..data
# We must build gate.so before we can assemble it.
# Note: kbuild does not track this dependency due to usage of .incbin
$(obj)/gate-data.o: $(obj)/gate.so
--- 0.org/arch/ia64/kernel/gate-data.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/gate-data.S Wed Jul 2 00:46:44 2008
@@ -1,3 +1,3 @@
- .section .data.gate, "aw"
+ .section .gate.data, "aw"
.incbin "arch/ia64/kernel/gate.so"
--- 0.org/arch/ia64/kernel/gate.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/gate.S Wed Jul 2 00:46:20 2008
@@ -20,18 +20,18 @@
* to targets outside the shared object) and to avoid multi-phase kernel builds, we
* simply create minimalistic "patch lists" in special ELF sections.
*/
- .section ".data.patch.fsyscall_table", "a"
+ .section ".patch.fsyscall_table.data", "a"
.previous
#define LOAD_FSYSCALL_TABLE(reg) \
[1:] movl reg=0; \
- .xdata4 ".data.patch.fsyscall_table", 1b-.
+ .xdata4 ".patch.fsyscall_table.data", 1b-.
- .section ".data.patch.brl_fsys_bubble_down", "a"
+ .section ".patch.brl_fsys_bubble_down.data", "a"
.previous
#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \
[1:](pr)brl.cond.sptk 0; \
;; \
- .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-.
+ .xdata4 ".patch.brl_fsys_bubble_down.data", 1b-.
GLOBAL_ENTRY(__kernel_syscall_via_break)
.prologue
--- 0.org/arch/ia64/kernel/gate.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/gate.lds.S Wed Jul 2 00:46:20 2008
@@ -32,21 +32,21 @@
*/
. = GATE_ADDR + 0x600;
- .data.patch : {
+ .patch.data : {
__start_gate_mckinley_e9_patchlist = .;
- *(.data.patch.mckinley_e9)
+ *(.patch.mckinley_e9.data)
__end_gate_mckinley_e9_patchlist = .;
__start_gate_vtop_patchlist = .;
- *(.data.patch.vtop)
+ *(.patch.vtop.data)
__end_gate_vtop_patchlist = .;
__start_gate_fsyscall_patchlist = .;
- *(.data.patch.fsyscall_table)
+ *(.patch.fsyscall_table.data)
__end_gate_fsyscall_patchlist = .;
__start_gate_brl_fsys_bubble_down_patchlist = .;
- *(.data.patch.brl_fsys_bubble_down)
+ *(.patch.brl_fsys_bubble_down.data)
__end_gate_brl_fsys_bubble_down_patchlist = .;
} :readable
--- 0.org/arch/ia64/kernel/head.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/head.S Wed Jul 2 00:44:22 2008
@@ -178,7 +178,7 @@
halt_msg:
stringz "Halting kernel\n"
- .section .text.head,"ax"
+ .section .head.text,"ax"
.global start_ap
--- 0.org/arch/ia64/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -28,7 +28,7 @@
* Initial task structure.
*
* We need to make sure that this is properly aligned due to the way process stacks are
- * handled. This is done by having a special ".data.init_task" section...
+ * handled. This is done by having a special ".init_task.data" section...
*/
#define init_thread_info init_task_mem.s.thread_info
@@ -38,7 +38,7 @@
struct thread_info thread_info;
} s;
unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{
+} init_task_mem asm ("init_task") __attribute__((section(".init_task.data"))) = {{
.task = INIT_TASK(init_task_mem.s.task),
.thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
}};
--- 0.org/arch/ia64/kernel/ivt.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/ivt.S Wed Jul 2 00:45:33 2008
@@ -75,7 +75,7 @@
mov r19=n;; /* prepare to save predicates */ \
br.sptk.many dispatch_to_fault_handler
- .section .text.ivt,"ax"
+ .section .ivt.text,"ax"
.align 32768 // align on 32KB boundary
.global ia64_ivt
--- 0.org/arch/ia64/kernel/minstate.h Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/minstate.h Wed Jul 2 00:46:20 2008
@@ -15,7 +15,7 @@
#define ACCOUNT_SYS_ENTER
#endif
-.section ".data.patch.rse", "a"
+.section ".patch.rse.data", "a"
.previous
/*
@@ -214,7 +214,7 @@
(pUStk) extr.u r17=r18,3,6; \
(pUStk) sub r16=r18,r22; \
[1:](pKStk) br.cond.sptk.many 1f; \
- .xdata4 ".data.patch.rse",1b-. \
+ .xdata4 ".patch.rse.data",1b-. \
;; \
cmp.ge p6,p7 = 33,r17; \
;; \
--- 0.org/arch/ia64/kernel/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kernel/vmlinux.lds.S Wed Jul 2 00:46:44 2008
@@ -9,7 +9,7 @@
#define IVT_TEXT \
VMLINUX_SYMBOL(__start_ivt_text) = .; \
- *(.text.ivt) \
+ *(.ivt.text) \
VMLINUX_SYMBOL(__end_ivt_text) = .;
OUTPUT_FORMAT("elf64-ia64-little")
@@ -52,13 +52,13 @@
KPROBES_TEXT
*(.gnu.linkonce.t*)
}
- .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
- { *(.text.head) }
+ .head.text : AT(ADDR(.head.text) - LOAD_OFFSET)
+ { *(.head.text) }
.text2 : AT(ADDR(.text2) - LOAD_OFFSET)
{ *(.text2) }
#ifdef CONFIG_SMP
- .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
- { *(.text.lock) }
+ .lock.text : AT(ADDR(.lock.text) - LOAD_OFFSET)
+ { *(.lock.text) }
#endif
_etext = .;
@@ -85,10 +85,10 @@
__stop___mca_table = .;
}
- .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET)
+ .patch.phys_stack_reg.data : AT(ADDR(.patch.phys_stack_reg.data) - LOAD_OFFSET)
{
__start___phys_stack_reg_patchlist = .;
- *(.data.patch.phys_stack_reg)
+ *(.patch.phys_stack_reg.data)
__end___phys_stack_reg_patchlist = .;
}
@@ -149,24 +149,24 @@
__initcall_end = .;
}
- .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
+ .patch.vtop.data : AT(ADDR(.patch.vtop.data) - LOAD_OFFSET)
{
__start___vtop_patchlist = .;
- *(.data.patch.vtop)
+ *(.patch.vtop.data)
__end___vtop_patchlist = .;
}
- .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET)
+ .patch.rse.data : AT(ADDR(.patch.rse.data) - LOAD_OFFSET)
{
__start___rse_patchlist = .;
- *(.data.patch.rse)
+ *(.patch.rse.data)
__end___rse_patchlist = .;
}
- .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
+ .patch.mckinley_e9.data : AT(ADDR(.patch.mckinley_e9.data) - LOAD_OFFSET)
{
__start___mckinley_e9_bundles = .;
- *(.data.patch.mckinley_e9)
+ *(.patch.mckinley_e9.data)
__end___mckinley_e9_bundles = .;
}
@@ -194,34 +194,34 @@
__init_end = .;
/* The initial task and kernel stack */
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
- { *(.data.init_task) }
+ .init_task.data : AT(ADDR(.init_task.data) - LOAD_OFFSET)
+ { *(.init_task.data) }
- .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
+ .page_aligned.data : AT(ADDR(.page_aligned.data) - LOAD_OFFSET)
{ *(__special_page_section)
__start_gate_section = .;
- *(.data.gate)
+ *(.gate.data)
__stop_gate_section = .;
}
. = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
* kernel data
*/
- .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
- { *(.data.read_mostly) }
+ .read_mostly.data : AT(ADDR(.read_mostly.data) - LOAD_OFFSET)
+ { *(.read_mostly.data) }
- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
- { *(.data.cacheline_aligned) }
+ .cacheline_aligned.data : AT(ADDR(.cacheline_aligned.data) - LOAD_OFFSET)
+ { *(.cacheline_aligned.data) }
/* Per-cpu data: */
percpu : { } :percpu
. = ALIGN(PERCPU_PAGE_SIZE);
__phys_per_cpu_start = .;
- .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
+ .percpu.data PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
{
__per_cpu_start = .;
- *(.data.percpu)
- *(.data.percpu.shared_aligned)
+ *(.percpu.data)
+ *(.percpu.shared_aligned.data)
__per_cpu_end = .;
}
. = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
--- 0.org/arch/ia64/kvm/vmm_ivt.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/ia64/kvm/vmm_ivt.S Wed Jul 2 00:45:33 2008
@@ -97,7 +97,7 @@
- .section .text.ivt,"ax"
+ .section .ivt.text,"ax"
.align 32768 // align on 32KB boundary
.global kvm_ia64_ivt
--- 0.org/include/asm-ia64/asmmacro.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-ia64/asmmacro.h Wed Jul 2 00:46:20 2008
@@ -70,12 +70,12 @@
* path (ivt.S - TLB miss processing) or in places where it might not be
* safe to use a "tpa" instruction (mca_asm.S - error recovery).
*/
- .section ".data.patch.vtop", "a" // declare section & section attributes
+ .section ".patch.vtop.data", "a" // declare section & section attributes
.previous
#define LOAD_PHYSICAL(pr, reg, obj) \
[1:](pr)movl reg = obj; \
- .xdata4 ".data.patch.vtop", 1b-.
+ .xdata4 ".patch.vtop.data", 1b-.
/*
* For now, we always put in the McKinley E9 workaround. On CPUs that don't need it,
@@ -84,11 +84,11 @@
#define DO_MCKINLEY_E9_WORKAROUND
#ifdef DO_MCKINLEY_E9_WORKAROUND
- .section ".data.patch.mckinley_e9", "a"
+ .section ".patch.mckinley_e9.data", "a"
.previous
/* workaround for Itanium 2 Errata 9: */
# define FSYS_RETURN \
- .xdata4 ".data.patch.mckinley_e9", 1f-.; \
+ .xdata4 ".patch.mckinley_e9.data", 1f-.; \
1:{ .mib; \
nop.m 0; \
mov r16=ar.pfs; \
@@ -107,11 +107,11 @@
* If physical stack register size is different from DEF_NUM_STACK_REG,
* dynamically patch the kernel for correct size.
*/
- .section ".data.patch.phys_stack_reg", "a"
+ .section ".patch.phys_stack_reg.data", "a"
.previous
#define LOAD_PHYS_STACK_REG_SIZE(reg) \
[1:] adds reg=IA64_NUM_PHYS_STACK_REG*8+8,r0; \
- .xdata4 ".data.patch.phys_stack_reg", 1b-.
+ .xdata4 ".patch.phys_stack_reg.data", 1b-.
/*
* Up until early 2004, use of .align within a function caused bad unwind info.
--- 0.org/include/asm-ia64/cache.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-ia64/cache.h Wed Jul 2 00:45:45 2008
@@ -24,6 +24,6 @@
# define SMP_CACHE_BYTES (1 << 3)
#endif
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
#endif /* _ASM_IA64_CACHE_H */
--- 0.org/include/asm-ia64/percpu.h Wed Jul 2 00:40:50 2008
+++ 1.fixname/include/asm-ia64/percpu.h Wed Jul 2 00:45:39 2008
@@ -27,7 +27,7 @@
#else /* ! SMP */
-#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
+#define PER_CPU_ATTRIBUTES __attribute__((__section__(".percpu.data")))
#define per_cpu_init() (__phys_per_cpu_start)
^ permalink raw reply
* [PATCH 8/23] make section names compatible with -ffunction-sections -fdata-sections: h8300
From: Denys Vlasenko @ 2008-07-02 0:36 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes h8300 architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/h8300/boot/compressed/head.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/h8300/boot/compressed/head.S Wed Jul 2 00:44:34 2008
@@ -9,7 +9,7 @@
#define SRAM_START 0xff4000
- .section .text.startup
+ .section .startup.text
.global startup
startup:
mov.l #SRAM_START+0x8000, sp
--- 0.org/arch/h8300/boot/compressed/vmlinux.lds Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/h8300/boot/compressed/vmlinux.lds Wed Jul 2 00:44:34 2008
@@ -4,7 +4,7 @@
{
__stext = . ;
__text = .;
- *(.text.startup)
+ *(.startup.text)
*(.text)
__etext = . ;
}
--- 0.org/arch/h8300/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/h8300/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -37,6 +37,6 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
--- 0.org/arch/h8300/kernel/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/h8300/kernel/vmlinux.lds.S Wed Jul 2 00:45:57 2008
@@ -101,7 +101,7 @@
___data_start = . ;
. = ALIGN(0x2000) ;
- *(.data.init_task)
+ *(.init_task.data)
. = ALIGN(0x4) ;
DATA_DATA
. = ALIGN(0x4) ;
^ permalink raw reply
* [PATCH 7/23] make section names compatible with -ffunction-sections -fdata-sections: frv
From: Denys Vlasenko @ 2008-07-02 0:36 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes frv architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/frv/kernel/break.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/break.S Wed Jul 2 01:04:35 2008
@@ -21,7 +21,7 @@
#
# the break handler has its own stack
#
- .section .bss.stack
+ .section .bss.k.stack
.globl __break_user_context
.balign THREAD_SIZE
__break_stack:
@@ -63,7 +63,7 @@
# entry point for Break Exceptions/Interrupts
#
###############################################################################
- .section .text.break
+ .section .break.text
.balign 4
.globl __entry_break
__entry_break:
--- 0.org/arch/frv/kernel/entry.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/entry.S Wed Jul 2 00:59:28 2008
@@ -38,7 +38,7 @@
#define nr_syscalls ((syscall_table_size)/4)
- .section .text.entry
+ .section .entry.text
.balign 4
.macro LEDS val
--- 0.org/arch/frv/kernel/head-mmu-fr451.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/head-mmu-fr451.S Wed Jul 2 00:44:28 2008
@@ -31,7 +31,7 @@
#define __400_LCR 0xfe000100
#define __400_LSBR 0xfe000c00
- .section .text.init,"ax"
+ .section .init.text,"ax"
.balign 4
###############################################################################
--- 0.org/arch/frv/kernel/head-uc-fr401.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/head-uc-fr401.S Wed Jul 2 00:44:28 2008
@@ -30,7 +30,7 @@
#define __400_LCR 0xfe000100
#define __400_LSBR 0xfe000c00
- .section .text.init,"ax"
+ .section .init.text,"ax"
.balign 4
###############################################################################
--- 0.org/arch/frv/kernel/head-uc-fr451.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/head-uc-fr451.S Wed Jul 2 00:44:28 2008
@@ -30,7 +30,7 @@
#define __400_LCR 0xfe000100
#define __400_LSBR 0xfe000c00
- .section .text.init,"ax"
+ .section .init.text,"ax"
.balign 4
###############################################################################
--- 0.org/arch/frv/kernel/head-uc-fr555.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/head-uc-fr555.S Wed Jul 2 00:44:28 2008
@@ -29,7 +29,7 @@
#define __551_LCR 0xfeff1100
#define __551_LSBR 0xfeff1c00
- .section .text.init,"ax"
+ .section .init.text,"ax"
.balign 4
###############################################################################
--- 0.org/arch/frv/kernel/head.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/head.S Wed Jul 2 00:44:34 2008
@@ -27,7 +27,7 @@
# command line string
#
###############################################################################
- .section .text.head,"ax"
+ .section .head.text,"ax"
.balign 4
.globl _boot, __head_reference
@@ -541,7 +541,7 @@
.size _boot, .-_boot
# provide a point for GDB to place a break
- .section .text.start,"ax"
+ .section .start.text,"ax"
.globl _start
.balign 4
_start:
--- 0.org/arch/frv/kernel/init_task.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/init_task.c Wed Jul 2 00:45:57 2008
@@ -25,7 +25,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
--- 0.org/arch/frv/kernel/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/kernel/vmlinux.lds.S Wed Jul 2 01:04:35 2008
@@ -26,7 +26,7 @@
_sinittext = .;
.init.text : {
- *(.text.head)
+ *(.head.text)
#ifndef CONFIG_DEBUG_INFO
INIT_TEXT
EXIT_TEXT
@@ -71,13 +71,13 @@
/* put sections together that have massive alignment issues */
. = ALIGN(THREAD_SIZE);
- .data.init_task : {
+ .init_task.data : {
/* init task record & stack */
- *(.data.init_task)
+ *(.init_task.data)
}
. = ALIGN(L1_CACHE_BYTES);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ .cacheline_aligned.data : { *(.cacheline_aligned.data) }
.trap : {
/* trap table management - read entry-table.S before modifying */
@@ -94,10 +94,10 @@
_text = .;
_stext = .;
.text : {
- *(.text.start)
- *(.text.entry)
- *(.text.break)
- *(.text.tlbmiss)
+ *(.start.text)
+ *(.entry.text)
+ *(.break.text)
+ *(.tlbmiss.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -152,7 +152,7 @@
.sbss : { *(.sbss .sbss.*) }
.bss : { *(.bss .bss.*) }
- .bss.stack : { *(.bss) }
+ .bss.k.stack : { *(.bss) }
__bss_stop = .;
_end = . ;
--- 0.org/arch/frv/mm/tlb-miss.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/frv/mm/tlb-miss.S Wed Jul 2 00:59:40 2008
@@ -16,7 +16,7 @@
#include <asm/highmem.h>
#include <asm/spr-regs.h>
- .section .text.tlbmiss
+ .section .tlbmiss.text
.balign 4
.globl __entry_insn_mmu_miss
^ permalink raw reply
* [PATCH 6/23] make section names compatible with -ffunction-sections -fdata-sections: cris
From: Denys Vlasenko @ 2008-07-02 0:35 UTC (permalink / raw)
To: linux-arch
Cc: Russell King, David Howells, Ralf Baechle, Lennert Buytenhek,
Josh Boyer, Paul Mackerras, David Woodhouse, Andi Kleen, torvalds,
akpm, Paul Gortmaker, linux-embedded, linux-kernel, Tim Bird,
Martin Schwidefsky, Dave Miller
The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes cris architecture.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
--- 0.org/arch/cris/arch-v10/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/cris/arch-v10/vmlinux.lds.S Wed Jul 2 00:45:57 2008
@@ -51,7 +51,7 @@
_edata = . ;
. = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
. = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
--- 0.org/arch/cris/arch-v32/vmlinux.lds.S Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/cris/arch-v32/vmlinux.lds.S Wed Jul 2 00:45:57 2008
@@ -63,7 +63,7 @@
_edata = . ;
. = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
- .data.init_task : { *(.data.init_task) }
+ .init_task.data : { *(.init_task.data) }
. = ALIGN(PAGE_SIZE); /* Init code and data. */
__init_begin = .;
--- 0.org/arch/cris/kernel/process.c Wed Jul 2 00:40:40 2008
+++ 1.fixname/arch/cris/kernel/process.c Wed Jul 2 00:45:57 2008
@@ -52,7 +52,7 @@
* "init_task" linker map entry..
*/
union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+ __attribute__((__section__(".init_task.data"))) =
{ INIT_THREAD_INFO(init_task) };
/*
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox