From 995b3b68f7356ccb8c4f89f310f24cdfa61ab465 Mon Sep 17 00:00:00 2001 From: David Mosberger Date: Sun, 7 Sep 2003 21:46:50 -0700 Subject: [PATCH] ia64: Fix things so that they compile with the latest GCC 3.4, which optimize away static variables with no compiler-visible use. --- arch/ia64/hp/sim/boot/boot_head.S | 8 ++++++++ arch/ia64/hp/sim/boot/bootloader.c | 10 +--------- arch/ia64/kernel/init_task.c | 6 ++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/ia64/hp/sim/boot/boot_head.S b/arch/ia64/hp/sim/boot/boot_head.S index 92c20ce3c4049..43dcebc8fd6d1 100644 --- a/arch/ia64/hp/sim/boot/boot_head.S +++ b/arch/ia64/hp/sim/boot/boot_head.S @@ -27,6 +27,14 @@ GLOBAL_ENTRY(_start) br.call.sptk.many rp=start_bootloader END(_start) +/* + * Set a break point on this function so that symbols are available to set breakpoints in + * the kernel being debugged. + */ +GLOBAL_ENTRY(debug_break) + br.ret.sptk.many b0 +END(debug_break) + GLOBAL_ENTRY(ssc) .regstk 5,0,0,0 mov r15=in4 diff --git a/arch/ia64/hp/sim/boot/bootloader.c b/arch/ia64/hp/sim/boot/bootloader.c index f49cde5de1f9f..51a7b7b4dd0e7 100644 --- a/arch/ia64/hp/sim/boot/bootloader.c +++ b/arch/ia64/hp/sim/boot/bootloader.c @@ -37,15 +37,7 @@ struct disk_stat { extern void jmp_to_kernel (unsigned long bp, unsigned long e_entry); extern struct ia64_boot_param *sys_fw_init (const char *args, int arglen); - -/* - * Set a break point on this function so that symbols are available to set breakpoints in - * the kernel being debugged. - */ -static void -debug_break (void) -{ -} +extern void debug_break (void); static void cons_write (const char *buf) diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c index ab79b199aadf1..241a84cacba67 100644 --- a/arch/ia64/kernel/init_task.c +++ b/arch/ia64/kernel/init_task.c @@ -28,15 +28,13 @@ struct mm_struct init_mm = INIT_MM(init_mm); */ #define init_thread_info init_task_mem.s.thread_info -static union { +union { struct { struct task_struct task; struct thread_info thread_info; } s; unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; -} init_task_mem asm ("init_task_mem") __attribute__((section(".data.init_task"))) = {{ +} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ .task = INIT_TASK(init_task_mem.s.task), .thread_info = INIT_THREAD_INFO(init_task_mem.s.task) }}; - -extern struct task_struct init_task __attribute__ ((alias("init_task_mem"))); -- 2.53.0