make section names compatible with -ffunction-sections -fdata-sections: powerpc
Subsystems (2)
PATCH 15/23 make section names compatible with -ffunction-sections -fdata-sections: powerpc
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 <[email protected]>
--
vda
arch/powerpc/kernel/head_32.S +1 -1
@@ -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:
arch/powerpc/kernel/head_40x.S +1 -1
@@ -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);
arch/powerpc/kernel/head_44x.S +1 -1
@@ -50,7 +50,7 @@ * r7 - End of kernel command line string * */ - .section .text.head, "ax" + .section .head.text, "ax" _ENTRY(_stext); _ENTRY(_start); /*
arch/powerpc/kernel/head_8xx.S +1 -1
@@ -38,7 +38,7 @@ #else #define DO_8xx_CPU6(val, reg) #endif - .section .text.head, "ax" + .section .head.text, "ax" _ENTRY(_stext); _ENTRY(_start);
arch/powerpc/kernel/head_fsl_booke.S +1 -1
@@ -52,7 +52,7 @@ * r7 - End of kernel command line string * */ - .section .text.head, "ax" + .section .head.text, "ax" _ENTRY(_stext); _ENTRY(_start); /*
arch/powerpc/kernel/init_task.c +1 -1
@@ -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) };/*
arch/powerpc/kernel/machine_kexec_64.c +1 -1
@@ -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,
arch/powerpc/kernel/vdso.c +1 -1
@@ -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 */
arch/powerpc/kernel/vdso32/vdso32_wrapper.S +1 -1
@@ -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
arch/powerpc/kernel/vdso64/vdso64_wrapper.S +1 -1
@@ -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
arch/powerpc/kernel/vmlinux.lds.S +14 -14
@@ -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 = .; }
include/asm-powerpc/cache.h +1 -1
@@ -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__ */
include/asm-powerpc/page_64.h +1 -1
@@ -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 \
include/asm-powerpc/ppc_asm.h +2 -2
@@ -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: \