* [RFC/PATCH] Fixup WARNINGs related to COMMON symbol
@ 2007-05-10 19:03 Kumar Gala
2007-05-12 11:48 ` Segher Boessenkool
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2007-05-10 19:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
We now get the following warnings:
WARNING: "ee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
WARNING: "fee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
WARNING: "htab_hash_searches" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: "next_slot" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: "mmu_hash_lock" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: "primary_pteg_full" [arch/powerpc/mm/built-in] is COMMON symbol
because these symbols are defined as .comm. It is not clear if there is
any reason for these sybmols to be .comm. Only mmu_hash_lock is global
and needed outside of the file scope its defined in.
If this patch looks good, I'll spin a version for arch/ppc and repost.
- k
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index c29d165..c7082d0 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -596,7 +596,11 @@ fast_exception_return:
mr r12,r4 /* restart at exc_exit_restart */
b 2b
- .comm fee_restarts,4
+ .section .bss
+ .align 2
+fee_restarts:
+ .space 4
+ .text
/* aargh, a nonrecoverable interrupt, panic */
/* aargh, we don't know which trap this is */
@@ -851,7 +855,11 @@ load_dbcr0:
mtspr SPRN_DBSR,r11 /* clear all pending debug events */
blr
- .comm global_dbcr0,8
+ .section .bss
+ .align 4
+global_dbcr0:
+ .space 8
+ .text
#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
do_work: /* r10 contains MSR_KERNEL here */
@@ -926,7 +934,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
/* shouldn't return */
b 4b
- .comm ee_restarts,4
+ .section .bss
+ .align 2
+ee_restarts:
+ .space 4
+ .text
/*
* PROM code for specific machines follows. Put it
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index ddceefc..8e1c059 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -30,7 +30,11 @@
#include <asm/asm-offsets.h>
#ifdef CONFIG_SMP
- .comm mmu_hash_lock,4
+ .section .bss
+ .align 2
+ .globl mmu_hash_lock
+mmu_hash_lock:
+ .space 4
#endif /* CONFIG_SMP */
/*
@@ -455,9 +459,15 @@ found_slot:
sync /* make sure pte updates get to memory */
blr
- .comm next_slot,4
- .comm primary_pteg_full,4
- .comm htab_hash_searches,4
+ .section .bss
+ .align 2
+next_slot:
+ .space 4
+primary_pteg_full:
+ .space 4
+htab_hash_searches:
+ .space 4
+ .text
/*
* Flush the entry for a particular page from the hash table.
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC/PATCH] Fixup WARNINGs related to COMMON symbol
2007-05-10 19:03 [RFC/PATCH] Fixup WARNINGs related to COMMON symbol Kumar Gala
@ 2007-05-12 11:48 ` Segher Boessenkool
0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2007-05-12 11:48 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
> - .comm fee_restarts,4
> + .section .bss
> + .align 2
> +fee_restarts:
> + .space 4
> + .text
Please use .previous instead of .text, it makes things
easier if ever the code section needs to change here.
Segher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-12 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 19:03 [RFC/PATCH] Fixup WARNINGs related to COMMON symbol Kumar Gala
2007-05-12 11:48 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).