From 1cca40bb70848f3234ddc16a0cd398f4bd4ef2d2 Mon Sep 17 00:00:00 2001 From: "Keith M. Wesolowski" Date: Sat, 27 Mar 2004 01:46:30 -0800 Subject: [PATCH] [SPARC32]: Correct init_thread_union section and alignment for gcc 3.3+ Recent tools are disregarding both the __asm__(".text") in init_task.c and the alignment at the end of .text in head.S. Use attributes instead. --- arch/sparc/kernel/head.S | 3 --- arch/sparc/kernel/init_task.c | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 0e669d0bfbe1b..42d3de59d19bf 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S @@ -746,9 +746,6 @@ go_to_highmem: jmpl %g1, %g0 nop - /* This is to align init_thread_union properly, be careful. -DaveM */ - .align 8192 - /* 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 * impossible */ diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index 8b451b235665f..0b29e5fa130f4 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c @@ -21,5 +21,7 @@ EXPORT_SYMBOL(init_task); * If this is not aligned on a 8k boundry, then you should change code * in etrap.S which assumes it. */ -__asm__(".section \".text\",#alloc\n"); -union thread_union init_thread_union = { INIT_THREAD_INFO(init_task) }; +union thread_union init_thread_union + __attribute__((section (".text"))) + __attribute__((aligned (THREAD_SIZE))) + = { INIT_THREAD_INFO(init_task) }; -- 2.53.0