make section names compatible with -ffunction-sections -fdata-sections: sparc
PATCH 19/23 make section names compatible with -ffunction-sections -fdata-sections: sparc
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
arch/sparc/boot/btfixupprep.c +2 -2
@@ -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;
arch/sparc/kernel/head.S +1 -1
@@ -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.
arch/sparc/kernel/vmlinux.lds.S +4 -4
@@ -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 = .;
arch/sparc64/kernel/head.S +1 -1
@@ -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)
arch/sparc64/kernel/vmlinux.lds.S +4 -4
@@ -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 = .);
include/asm-sparc/cache.h +1 -1
@@ -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>