Re: [PATCH 1/7] Make section names compatible with -ffunction-sections -fdata-sections

Anders Kaseorg
2009-02-05T01:12:23Z

On Wed, 4 Feb 2009, Rusty Russell wrote:
> PS. Here's the extra ones I found. Since you only enable sections on x86,
> it's not critical, but nice to cover them all.

It looks like you didn’t base your work on the current copy of the patch
posted to this thread [1]. That copy already includes all but two of your
changes (arch/s390/kernel/vdso.c and arch/sparc/kernel/init_task.c, in
which the lines in question were introduced by recent commits), along with
some others.

[1] <http://lkml.org/lkml/2009/1/4/196>

> --- a/arch/s390/kernel/vdso32/vdso32_wrapper.S
> +++ b/arch/s390/kernel/vdso32/vdso32_wrapper.S
> @@ -1,7 +1,7 @@
> #include <linux/init.h>
> #include <asm/page.h>
>
> - .section ".data.page_aligned"
> + .section ".kernel.data.page_aligned"
>
> .globl vdso32_start, vdso32_end
> .balign PAGE_SIZE

This change is wrong; you need to specify
.section ".kernel.data.page_aligned", "aw"
like we do in [1], or else the assembler will not set the ALLOC flag on
that section, leading to a crash at runtime.

We will send a new copy of the patch that includes your two changes
shortly.

Anders