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 <[EMAIL PROTECTED]>
--
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>
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to