Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Consistently use .gnu.warning with .pushsectio and ...



details:   https://anonhg.NetBSD.org/src/rev/fe1d0326cd56
branches:  trunk
changeset: 759929:fe1d0326cd56
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Dec 20 21:11:24 2010 +0000

description:
Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.

diffstat:

 sys/arch/alpha/include/asm.h   |  14 +++++++++-----
 sys/arch/amd64/include/asm.h   |  13 +++++++------
 sys/arch/arm/include/asm.h     |  14 +++++++++++---
 sys/arch/hppa/include/asm.h    |  14 ++++++++------
 sys/arch/i386/include/asm.h    |  16 +++++++---------
 sys/arch/m68k/include/asm.h    |  14 +++++++-------
 sys/arch/mips/include/asm.h    |  14 +++++++++-----
 sys/arch/powerpc/include/asm.h |  14 +++++++++-----
 sys/arch/sh3/include/asm.h     |  15 ++++++++++++---
 sys/arch/sparc/include/asm.h   |  14 +++++++++-----
 sys/arch/vax/include/asm.h     |  12 +++++++-----
 11 files changed, 95 insertions(+), 59 deletions(-)

diffs (truncated from 325 to 300 lines):

diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/alpha/include/asm.h
--- a/sys/arch/alpha/include/asm.h      Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/alpha/include/asm.h      Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.30 2007/02/09 21:55:01 ad Exp $ */
+/* $NetBSD: asm.h,v 1.31 2010/12/20 21:11:24 joerg Exp $ */
 
 /* 
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -628,11 +628,15 @@
  * WARN_REFERENCES: create a warning if the specified symbol is referenced.
  */
 #ifdef __STDC__
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning. ## _sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning./**/_sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 /*
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/amd64/include/asm.h
--- a/sys/arch/amd64/include/asm.h      Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/amd64/include/asm.h      Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.13 2008/10/26 00:08:15 mrg Exp $     */
+/*     $NetBSD: asm.h,v 1.14 2010/12/20 21:11:24 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -119,15 +119,16 @@
        .globl alias;                                                   \
        alias = sym
 
-/* XXXfvdl do not use stabs here */
 #ifdef __STDC__
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg ## ,30,0,0,0 ;                                       \
-       .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(sym),1,0,0,0
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 #else  /*      __x86_64__      */
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/arm/include/asm.h
--- a/sys/arch/arm/include/asm.h        Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/arm/include/asm.h        Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.12 2008/08/29 19:00:25 matt Exp $    */
+/*     $NetBSD: asm.h,v 1.13 2010/12/20 21:11:24 joerg Exp $   */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -139,9 +139,17 @@
        .globl alias;                                                   \
        alias = sym
 
+#ifdef __STDC__
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(_C_LABEL(sym)),1,0,0,0
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
+#else
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
+#endif /* __STDC__ */
 
 #ifdef __thumb__
 # define XPUSH         push
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/hppa/include/asm.h
--- a/sys/arch/hppa/include/asm.h       Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/hppa/include/asm.h       Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.11 2010/03/08 07:42:46 skrll Exp $   */
+/*     $NetBSD: asm.h,v 1.12 2010/12/20 21:11:24 joerg Exp $   */
 
 /*     $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */
 
@@ -135,13 +135,15 @@
 
 #ifdef __STDC__
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg ## ,30,0,0,0 ;                                       \
-       .stabs __STRING(sym) ## ,1,0,0,0
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(sym),1,0,0,0
-#endif
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
+#endif /* __STDC__ */
 
 #define        BSS(n,s)        .comm n, s
 #define        SZREG   4
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/i386/include/asm.h
--- a/sys/arch/i386/include/asm.h       Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/i386/include/asm.h       Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.38 2008/05/03 05:54:52 yamt Exp $    */
+/*     $NetBSD: asm.h,v 1.39 2010/12/20 21:11:24 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -205,16 +205,14 @@
 
 #ifdef __STDC__
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg ## ,30,0,0,0 ;                                       \
-       .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
-#elif defined(__ELF__)
-#define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(sym),1,0,0,0
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(_/**/sym),1,0,0,0
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 #endif /* !_I386_ASM_H_ */
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/m68k/include/asm.h
--- a/sys/arch/m68k/include/asm.h       Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/m68k/include/asm.h       Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.26 2010/12/20 00:25:36 matt Exp $    */
+/*     $NetBSD: asm.h,v 1.27 2010/12/20 21:11:25 joerg Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -231,15 +231,15 @@
        alias = sym
 
 #ifdef __STDC__
-#define        __STRING(x)                     #x
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg ## ,30,0,0,0 ;                                       \
-       .stabs __STRING(_ ## sym) ## ,1,0,0,0
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
-#define        __STRING(x)                     "x"
 #define        WARN_REFERENCES(sym,msg)                                        \
-       .stabs msg,30,0,0,0 ;                                           \
-       .stabs __STRING(_/**/sym),1,0,0,0
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 /*
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/mips/include/asm.h
--- a/sys/arch/mips/include/asm.h       Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/mips/include/asm.h       Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.42 2010/07/07 01:19:09 chs Exp $     */
+/*     $NetBSD: asm.h,v 1.43 2010/12/20 21:11:25 joerg Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -118,11 +118,15 @@
  * WARN_REFERENCES: create a warning if the specified symbol is referenced.
  */
 #ifdef __STDC__
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning. ## _sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning./**/_sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 /*
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/powerpc/include/asm.h
--- a/sys/arch/powerpc/include/asm.h    Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/powerpc/include/asm.h    Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.29 2010/03/09 22:36:41 matt Exp $    */
+/*     $NetBSD: asm.h,v 1.30 2010/12/20 21:11:25 joerg Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -138,11 +138,15 @@
        alias = sym
 
 #ifdef __STDC__
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning. ## _sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning./**/_sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 
 #ifdef _KERNEL
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/sh3/include/asm.h
--- a/sys/arch/sh3/include/asm.h        Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/sh3/include/asm.h        Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.26 2008/09/19 03:02:35 uwe Exp $     */
+/*     $NetBSD: asm.h,v 1.27 2010/12/20 21:11:25 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -227,7 +227,16 @@
        .globl _C_LABEL(alias);                                         \
        _C_LABEL(alias) = _C_LABEL(sym)
 
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning._sym; .ascii _msg; .previous
+#ifdef __STDC__
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
+#else
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
+#endif /* __STDC__ */
 
 #endif /* !_SH3_ASM_H_ */
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/sparc/include/asm.h
--- a/sys/arch/sparc/include/asm.h      Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/sparc/include/asm.h      Mon Dec 20 21:11:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.17 2010/12/20 00:25:43 matt Exp $ */
+/*     $NetBSD: asm.h,v 1.18 2010/12/20 21:11:25 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 Allen Briggs
@@ -185,11 +185,15 @@
  */
 #ifdef __ELF__
 #ifdef __STDC__
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning. ## _sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning. ## sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #else
-#define        WARN_REFERENCES(_sym,_msg)                              \
-       .section .gnu.warning./**/_sym ; .ascii _msg ; .text
+#define        WARN_REFERENCES(sym,msg)                                        \
+       .pushsection .gnu.warning./**/sym;                              \
+       .ascii msg;                                                     \
+       .popsection
 #endif /* __STDC__ */
 #else
 #ifdef __STDC__
diff -r cc873e5e294a -r fe1d0326cd56 sys/arch/vax/include/asm.h
--- a/sys/arch/vax/include/asm.h        Mon Dec 20 19:51:03 2010 +0000
+++ b/sys/arch/vax/include/asm.h        Mon Dec 20 21:11:24 2010 +0000



Home | Main Index | Thread Index | Old Index