Module Name: src Committed By: joerg Date: Mon Dec 20 21:11:26 UTC 2010
Modified Files: src/sys/arch/alpha/include: asm.h src/sys/arch/amd64/include: asm.h src/sys/arch/arm/include: asm.h src/sys/arch/hppa/include: asm.h src/sys/arch/i386/include: asm.h src/sys/arch/m68k/include: asm.h src/sys/arch/mips/include: asm.h src/sys/arch/powerpc/include: asm.h src/sys/arch/sh3/include: asm.h src/sys/arch/sparc/include: asm.h src/sys/arch/vax/include: asm.h Log Message: Consistently use .gnu.warning with .pushsectio and .popsection on all architectures instead of obsolete STABS frames for linker warnings. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/alpha/include/asm.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/include/asm.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/asm.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/include/asm.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/i386/include/asm.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/m68k/include/asm.h cvs rdiff -u -r1.42 -r1.43 src/sys/arch/mips/include/asm.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/include/asm.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sh3/include/asm.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/include/asm.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/vax/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/include/asm.h diff -u src/sys/arch/alpha/include/asm.h:1.30 src/sys/arch/alpha/include/asm.h:1.31 --- src/sys/arch/alpha/include/asm.h:1.30 Fri Feb 9 21:55:01 2007 +++ src/sys/arch/alpha/include/asm.h Mon Dec 20 21:11:24 2010 @@ -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__ */ /* Index: src/sys/arch/amd64/include/asm.h diff -u src/sys/arch/amd64/include/asm.h:1.13 src/sys/arch/amd64/include/asm.h:1.14 --- src/sys/arch/amd64/include/asm.h:1.13 Sun Oct 26 00:08:15 2008 +++ src/sys/arch/amd64/include/asm.h Mon Dec 20 21:11:24 2010 @@ -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__ */ Index: src/sys/arch/arm/include/asm.h diff -u src/sys/arch/arm/include/asm.h:1.12 src/sys/arch/arm/include/asm.h:1.13 --- src/sys/arch/arm/include/asm.h:1.12 Fri Aug 29 19:00:25 2008 +++ src/sys/arch/arm/include/asm.h Mon Dec 20 21:11:24 2010 @@ -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) \ + .pushsection .gnu.warning. ## sym; \ + .ascii msg; \ + .popsection +#else #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 +#endif /* __STDC__ */ #ifdef __thumb__ # define XPUSH push Index: src/sys/arch/hppa/include/asm.h diff -u src/sys/arch/hppa/include/asm.h:1.11 src/sys/arch/hppa/include/asm.h:1.12 --- src/sys/arch/hppa/include/asm.h:1.11 Mon Mar 8 07:42:46 2010 +++ src/sys/arch/hppa/include/asm.h Mon Dec 20 21:11:24 2010 @@ -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 Index: src/sys/arch/i386/include/asm.h diff -u src/sys/arch/i386/include/asm.h:1.38 src/sys/arch/i386/include/asm.h:1.39 --- src/sys/arch/i386/include/asm.h:1.38 Sat May 3 05:54:52 2008 +++ src/sys/arch/i386/include/asm.h Mon Dec 20 21:11:24 2010 @@ -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_ */ Index: src/sys/arch/m68k/include/asm.h diff -u src/sys/arch/m68k/include/asm.h:1.26 src/sys/arch/m68k/include/asm.h:1.27 --- src/sys/arch/m68k/include/asm.h:1.26 Mon Dec 20 00:25:36 2010 +++ src/sys/arch/m68k/include/asm.h Mon Dec 20 21:11:25 2010 @@ -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__ */ /* Index: src/sys/arch/mips/include/asm.h diff -u src/sys/arch/mips/include/asm.h:1.42 src/sys/arch/mips/include/asm.h:1.43 --- src/sys/arch/mips/include/asm.h:1.42 Wed Jul 7 01:19:09 2010 +++ src/sys/arch/mips/include/asm.h Mon Dec 20 21:11:25 2010 @@ -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 -#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 +#else +#define WARN_REFERENCES(sym,msg) \ + .pushsection .gnu.warning./**/sym; \ + .ascii msg; \ + .popsection #endif /* __STDC__ */ /* Index: src/sys/arch/powerpc/include/asm.h diff -u src/sys/arch/powerpc/include/asm.h:1.29 src/sys/arch/powerpc/include/asm.h:1.30 --- src/sys/arch/powerpc/include/asm.h:1.29 Tue Mar 9 22:36:41 2010 +++ src/sys/arch/powerpc/include/asm.h Mon Dec 20 21:11:25 2010 @@ -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 Index: src/sys/arch/sh3/include/asm.h diff -u src/sys/arch/sh3/include/asm.h:1.26 src/sys/arch/sh3/include/asm.h:1.27 --- src/sys/arch/sh3/include/asm.h:1.26 Fri Sep 19 03:02:35 2008 +++ src/sys/arch/sh3/include/asm.h Mon Dec 20 21:11:25 2010 @@ -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_ */ Index: src/sys/arch/sparc/include/asm.h diff -u src/sys/arch/sparc/include/asm.h:1.17 src/sys/arch/sparc/include/asm.h:1.18 --- src/sys/arch/sparc/include/asm.h:1.17 Mon Dec 20 00:25:43 2010 +++ src/sys/arch/sparc/include/asm.h Mon Dec 20 21:11:25 2010 @@ -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__ Index: src/sys/arch/vax/include/asm.h diff -u src/sys/arch/vax/include/asm.h:1.21 src/sys/arch/vax/include/asm.h:1.22 --- src/sys/arch/vax/include/asm.h:1.21 Sun Aug 31 23:23:42 2008 +++ src/sys/arch/vax/include/asm.h Mon Dec 20 21:11:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.21 2008/08/31 23:23:42 mrg Exp $ */ +/* $NetBSD: asm.h,v 1.22 2010/12/20 21:11:26 joerg Exp $ */ /* * Copyright (c) 1982, 1993 * The Regents of the University of California. All rights reserved. @@ -94,12 +94,14 @@ #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(_C_LABEL(sym)),1,0,0,0 + .pushsection .gnu.warning./**/sym; \ + .ascii msg; \ + .popsection #endif /* __STDC__ */ #endif /* !_VAX_ASM_H_ */