Fri Apr 17 14:19:44 2020 UTC ()
Mark the .ident section as mergable string section to avoid redundant
entries.


(joerg)
diff -r1.36 -r1.37 src/sys/arch/alpha/include/asm.h
diff -r1.19 -r1.20 src/sys/arch/amd64/include/asm.h
diff -r1.31 -r1.32 src/sys/arch/arm/include/asm.h
diff -r1.16 -r1.17 src/sys/arch/hppa/include/asm.h
diff -r1.42 -r1.43 src/sys/arch/i386/include/asm.h
diff -r1.7 -r1.8 src/sys/arch/ia64/include/asm.h
diff -r1.33 -r1.34 src/sys/arch/m68k/include/asm.h
diff -r1.55 -r1.56 src/sys/arch/mips/include/asm.h
diff -r1.1 -r1.2 src/sys/arch/or1k/include/asm.h
diff -r1.49 -r1.50 src/sys/arch/powerpc/include/asm.h
diff -r1.4 -r1.5 src/sys/arch/riscv/include/asm.h
diff -r1.28 -r1.29 src/sys/arch/sh3/include/asm.h
diff -r1.22 -r1.23 src/sys/arch/sparc/include/asm.h
diff -r1.27 -r1.28 src/sys/arch/vax/include/asm.h
diff -r1.55 -r1.56 src/sys/sys/cdefs_elf.h

cvs diff -r1.36 -r1.37 src/sys/arch/alpha/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/alpha/include/asm.h 2017/01/14 21:58:17 1.36
+++ src/sys/arch/alpha/include/asm.h 2020/04/17 14:19:43 1.37
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.36 2017/01/14 21:58:17 christos Exp $ */ 1/* $NetBSD: asm.h,v 1.37 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University 4 * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
5 * All Rights Reserved. 5 * All Rights Reserved.
6 * 6 *
7 * Permission to use, copy, modify and distribute this software and its 7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright 8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the 9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions 10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation. 11 * thereof, and that both notices appear in supporting documentation.
12 * 12 *
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
@@ -633,27 +633,29 @@ label: ASCIZ msg; \ @@ -633,27 +633,29 @@ label: ASCIZ msg; \
633 .ascii msg; \ 633 .ascii msg; \
634 .popsection 634 .popsection
635#else 635#else
636#define WARN_REFERENCES(sym,msg) \ 636#define WARN_REFERENCES(sym,msg) \
637 .pushsection .gnu.warning./**/sym; \ 637 .pushsection .gnu.warning./**/sym; \
638 .ascii msg; \ 638 .ascii msg; \
639 .popsection 639 .popsection
640#endif /* __STDC__ */ 640#endif /* __STDC__ */
641 641
642/* 642/*
643 * Kernel RCS ID tag and copyright macros 643 * Kernel RCS ID tag and copyright macros
644 */ 644 */
645#define __SECTIONSTRING(_sec, _str) \ 645#define __SECTIONSTRING(_sec, _str) \
646 .pushsection _sec ; .asciz _str ; .popsection 646 .pushsection _sec,"MS",@progbits,1; \
 647 .asciz x; \
 648 .popsection
647 649
648#ifdef _KERNEL 650#ifdef _KERNEL
649 651
650#define __KERNEL_RCSID(_n, _s) __SECTIONSTRING(.ident, _s) 652#define __KERNEL_RCSID(_n, _s) __SECTIONSTRING(.ident, _s)
651#define __KERNEL_COPYRIGHT(_n, _s) __SECTIONSTRING(.copyright, _s) 653#define __KERNEL_COPYRIGHT(_n, _s) __SECTIONSTRING(.copyright, _s)
652 654
653#ifdef NO_KERNEL_RCSIDS 655#ifdef NO_KERNEL_RCSIDS
654#undef __KERNEL_RCSID 656#undef __KERNEL_RCSID
655#define __KERNEL_RCSID(_n, _s) /* nothing */ 657#define __KERNEL_RCSID(_n, _s) /* nothing */
656#endif 658#endif
657 659
658#if defined(MULTIPROCESSOR) 660#if defined(MULTIPROCESSOR)
659 661

cvs diff -r1.19 -r1.20 src/sys/arch/amd64/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/amd64/include/asm.h 2014/05/22 14:59:01 1.19
+++ src/sys/arch/amd64/include/asm.h 2020/04/17 14:19:43 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.19 2014/05/22 14:59:01 uebayasi Exp $ */ 1/* $NetBSD: asm.h,v 1.20 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -102,27 +102,29 @@ @@ -102,27 +102,29 @@
102#else 102#else
103# define _PROF_PROLOGUE 103# define _PROF_PROLOGUE
104#endif 104#endif
105 105
106#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE 106#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
107#define NENTRY(y) _ENTRY(_C_LABEL(y)) 107#define NENTRY(y) _ENTRY(_C_LABEL(y))
108#define ALTENTRY(x) NENTRY(x) 108#define ALTENTRY(x) NENTRY(x)
109#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE 109#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
110#define LABEL(y) _LABEL(_C_LABEL(y)) 110#define LABEL(y) _LABEL(_C_LABEL(y))
111#define END(y) .size y, . - y 111#define END(y) .size y, . - y
112 112
113#define ASMSTR .asciz 113#define ASMSTR .asciz
114 114
115#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection 115#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 116 .asciz x; \
 117 .popsection
116 118
117#define WEAK_ALIAS(alias,sym) \ 119#define WEAK_ALIAS(alias,sym) \
118 .weak alias; \ 120 .weak alias; \
119 alias = sym 121 alias = sym
120 122
121/* 123/*
122 * STRONG_ALIAS: create a strong alias. 124 * STRONG_ALIAS: create a strong alias.
123 */ 125 */
124#define STRONG_ALIAS(alias,sym) \ 126#define STRONG_ALIAS(alias,sym) \
125 .globl alias; \ 127 .globl alias; \
126 alias = sym 128 alias = sym
127 129
128#ifdef __STDC__ 130#ifdef __STDC__

cvs diff -r1.31 -r1.32 src/sys/arch/arm/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/arm/include/asm.h 2020/04/13 05:40:25 1.31
+++ src/sys/arch/arm/include/asm.h 2020/04/17 14:19:43 1.32
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.31 2020/04/13 05:40:25 maxv Exp $ */ 1/* $NetBSD: asm.h,v 1.32 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -211,27 +211,29 @@ @@ -211,27 +211,29 @@
211#endif 211#endif
212 212
213#else 213#else
214#define REL_SYM(a, b) (a) 214#define REL_SYM(a, b) (a)
215#define PLT_SYM(x) x 215#define PLT_SYM(x) x
216#define GOT_SYM(x) x 216#define GOT_SYM(x) x
217#define GOT_GET(x,got,sym) \ 217#define GOT_GET(x,got,sym) \
218 ldr x, sym; 218 ldr x, sym;
219#define GOT_INIT(got,gotsym,pclabel) 219#define GOT_INIT(got,gotsym,pclabel)
220#define GOT_INITSYM(gotsym,pclabel) 220#define GOT_INITSYM(gotsym,pclabel)
221#define PIC_SYM(x,y) x 221#define PIC_SYM(x,y) x
222#endif /* __PIC__ */ 222#endif /* __PIC__ */
223 223
224#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection 224#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 225 .asciz x; \
 226 .popsection
225 227
226#define WEAK_ALIAS(alias,sym) \ 228#define WEAK_ALIAS(alias,sym) \
227 .weak alias; \ 229 .weak alias; \
228 alias = sym 230 alias = sym
229 231
230/* 232/*
231 * STRONG_ALIAS: create a strong alias. 233 * STRONG_ALIAS: create a strong alias.
232 */ 234 */
233#define STRONG_ALIAS(alias,sym) \ 235#define STRONG_ALIAS(alias,sym) \
234 .globl alias; \ 236 .globl alias; \
235 alias = sym 237 alias = sym
236 238
237#ifdef __STDC__ 239#ifdef __STDC__

cvs diff -r1.16 -r1.17 src/sys/arch/hppa/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/hppa/include/asm.h 2019/04/16 12:25:17 1.16
+++ src/sys/arch/hppa/include/asm.h 2020/04/17 14:19:43 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.16 2019/04/16 12:25:17 skrll Exp $ */ 1/* $NetBSD: asm.h,v 1.17 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/* $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */ 3/* $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */
4 4
5/* 5/*
6 * Copyright (c) 1990,1991,1994 The University of Utah and 6 * Copyright (c) 1990,1991,1994 The University of Utah and
7 * the Computer Systems Laboratory (CSL). All rights reserved. 7 * the Computer Systems Laboratory (CSL). All rights reserved.
8 * 8 *
9 * Permission to use, copy, modify and distribute this software is hereby 9 * Permission to use, copy, modify and distribute this software is hereby
10 * granted provided that (1) source code retains these copyright, permission, 10 * granted provided that (1) source code retains these copyright, permission,
11 * and disclaimer notices, and (2) redistributions including binaries 11 * and disclaimer notices, and (2) redistributions including binaries
12 * reproduce the notices in supporting documentation, and (3) all advertising 12 * reproduce the notices in supporting documentation, and (3) all advertising
13 * materials mentioning features or use of this software display the following 13 * materials mentioning features or use of this software display the following
14 * acknowledgement: ``This product includes software developed by the 14 * acknowledgement: ``This product includes software developed by the
@@ -89,28 +89,28 @@ @@ -89,28 +89,28 @@
89 89
90#define LEAF_ENTRY(x) !\ 90#define LEAF_ENTRY(x) !\
91 LEAF_ENTRY_NOPROFILE(x) 91 LEAF_ENTRY_NOPROFILE(x)
92 92
93#endif /* GPROF */ 93#endif /* GPROF */
94 94
95#define ENTRY(x,n) !\ 95#define ENTRY(x,n) !\
96 ENTRY_NOPROFILE(x,n) !\ 96 ENTRY_NOPROFILE(x,n) !\
97 _PROF_PROLOGUE 97 _PROF_PROLOGUE
98 98
99#define ALTENTRY(x) ! .export x, entry ! .label x 99#define ALTENTRY(x) ! .export x, entry ! .label x
100#define EXIT(x) ! .exit ! .procend ! .size x, .-x 100#define EXIT(x) ! .exit ! .procend ! .size x, .-x
101 101
102#define RCSID(x) .pushsection ".ident" !\ 102#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
103 .asciz x !\ 103 .asciz x; \
104 .popsection 104 .popsection
105 105
106#define WEAK_ALIAS(alias,sym) \ 106#define WEAK_ALIAS(alias,sym) \
107 .weak alias ! \ 107 .weak alias ! \
108 alias = sym 108 alias = sym
109 109
110/* 110/*
111 * STRONG_ALIAS: create a strong alias. 111 * STRONG_ALIAS: create a strong alias.
112 */ 112 */
113#define STRONG_ALIAS(alias,sym) \ 113#define STRONG_ALIAS(alias,sym) \
114 .globl alias ! \ 114 .globl alias ! \
115 alias = sym 115 alias = sym
116 116

cvs diff -r1.42 -r1.43 src/sys/arch/i386/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/i386/include/asm.h 2016/05/15 15:26:04 1.42
+++ src/sys/arch/i386/include/asm.h 2020/04/17 14:19:43 1.43
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.42 2016/05/15 15:26:04 chs Exp $ */ 1/* $NetBSD: asm.h,v 1.43 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -171,27 +171,29 @@ @@ -171,27 +171,29 @@
171# define _PROF_PROLOGUE 171# define _PROF_PROLOGUE
172#endif 172#endif
173 173
174#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE 174#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
175#define NENTRY(y) _ENTRY(_C_LABEL(y)) 175#define NENTRY(y) _ENTRY(_C_LABEL(y))
176#define ALTENTRY(x) NENTRY(x) 176#define ALTENTRY(x) NENTRY(x)
177#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE 177#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
178#define LABEL(y) _LABEL(_C_LABEL(y)) 178#define LABEL(y) _LABEL(_C_LABEL(y))
179#define END(y) .size y, . - y 179#define END(y) .size y, . - y
180 180
181#define ASMSTR .asciz 181#define ASMSTR .asciz
182 182
183#ifdef __ELF__ 183#ifdef __ELF__
184#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection 184#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 185 .asciz x; \
 186 .popsection
185#else 187#else
186#define RCSID(x) .text; .asciz x 188#define RCSID(x) .text; .asciz x
187#endif 189#endif
188 190
189#ifdef NO_KERNEL_RCSIDS 191#ifdef NO_KERNEL_RCSIDS
190#define __KERNEL_RCSID(_n, _s) /* nothing */ 192#define __KERNEL_RCSID(_n, _s) /* nothing */
191#else 193#else
192#define __KERNEL_RCSID(_n, _s) RCSID(_s) 194#define __KERNEL_RCSID(_n, _s) RCSID(_s)
193#endif 195#endif
194 196
195#ifdef __ELF__ 197#ifdef __ELF__
196#define WEAK_ALIAS(alias,sym) \ 198#define WEAK_ALIAS(alias,sym) \
197 .weak alias; \ 199 .weak alias; \

cvs diff -r1.7 -r1.8 src/sys/arch/ia64/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/ia64/include/asm.h 2014/03/14 17:36:03 1.7
+++ src/sys/arch/ia64/include/asm.h 2020/04/17 14:19:43 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.7 2014/03/14 17:36:03 cherry Exp $ */ 1/* $NetBSD: asm.h,v 1.8 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/* - 3/* -
4 * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University 4 * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
5 * All Rights Reserved. 5 * All Rights Reserved.
6 *  6 *
7 * Permission to use, copy, modify and distribute this software and its 7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright 8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the 9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions 10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation. 11 * thereof, and that both notices appear in supporting documentation.
12 *  12 *
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
@@ -193,27 +193,29 @@ label: ASCIZ msg; \ @@ -193,27 +193,29 @@ label: ASCIZ msg; \
193#define WARN_REFERENCES(sym,msg) \ 193#define WARN_REFERENCES(sym,msg) \
194 .pushsection .gnu.warning. ## sym; \ 194 .pushsection .gnu.warning. ## sym; \
195 .ascii msg; \ 195 .ascii msg; \
196 .popsection 196 .popsection
197#else 197#else
198#define WARN_REFERENCES(sym,msg) \ 198#define WARN_REFERENCES(sym,msg) \
199 .pushsection .gnu.warning./**/sym; \ 199 .pushsection .gnu.warning./**/sym; \
200 .ascii msg; \ 200 .ascii msg; \
201 .popsection 201 .popsection
202#endif /* __STDC__ */ 202#endif /* __STDC__ */
203 203
204 204
205#ifdef __ELF__ 205#ifdef __ELF__
206#define RCSID(name) .pushsection ".ident"; .asciz name; .popsection 206#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 207 .asciz x; \
 208 .popsection
207#else 209#else
208#define RCSID(name) .asciz name 210#define RCSID(name) .asciz name
209#endif 211#endif
210 212
211/* 213/*
212 * Kernel RCS ID tag and copyright macros 214 * Kernel RCS ID tag and copyright macros
213 */ 215 */
214 216
215#ifdef _KERNEL 217#ifdef _KERNEL
216 218
217#define __KERNEL_SECTIONSTRING(_sec, _str) \ 219#define __KERNEL_SECTIONSTRING(_sec, _str) \
218 .pushsection _sec ; .asciz _str ; .popsection 220 .pushsection _sec ; .asciz _str ; .popsection
219 221

cvs diff -r1.33 -r1.34 src/sys/arch/m68k/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/m68k/include/asm.h 2013/09/12 15:36:17 1.33
+++ src/sys/arch/m68k/include/asm.h 2020/04/17 14:19:43 1.34
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.33 2013/09/12 15:36:17 joerg Exp $ */ 1/* $NetBSD: asm.h,v 1.34 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -129,28 +129,28 @@ @@ -129,28 +129,28 @@
129 * 129 *
130 * The m68k behavior is similar to the ENTRY2 macro found in 130 * The m68k behavior is similar to the ENTRY2 macro found in
131 * solaris' asm_linkage.h. 131 * solaris' asm_linkage.h.
132 * 132 *
133 * Providing ENTRY2 and changing all the code that uses ALTENTRY 133 * Providing ENTRY2 and changing all the code that uses ALTENTRY
134 * to use it would be a desirable change. 134 * to use it would be a desirable change.
135 */ 135 */
136#ifdef PROF 136#ifdef PROF
137#define ALTENTRY(name, rname) ENTRY(name); jra rname+12 137#define ALTENTRY(name, rname) ENTRY(name); jra rname+12
138#else 138#else
139#define ALTENTRY(name, rname) _ENTRY(_C_LABEL(name)) 139#define ALTENTRY(name, rname) _ENTRY(_C_LABEL(name))
140#endif 140#endif
141 141
142#define RCSID(x) .pushsection ".ident" ; \ 142#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
143 .asciz x ; \ 143 .asciz x; \
144 .popsection 144 .popsection
145 145
146/* 146/*
147 * Global variables of whatever sort. 147 * Global variables of whatever sort.
148 */ 148 */
149#define GLOBAL(x) \ 149#define GLOBAL(x) \
150 .globl _C_LABEL(x) ; \ 150 .globl _C_LABEL(x) ; \
151 _C_LABEL(x): 151 _C_LABEL(x):
152 152
153#define ASGLOBAL(x) \ 153#define ASGLOBAL(x) \
154 .globl _ASM_LABEL(x) ; \ 154 .globl _ASM_LABEL(x) ; \
155 _ASM_LABEL(x): 155 _ASM_LABEL(x):
156 156

cvs diff -r1.55 -r1.56 src/sys/arch/mips/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/mips/include/asm.h 2018/09/04 00:01:41 1.55
+++ src/sys/arch/mips/include/asm.h 2020/04/17 14:19:43 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.55 2018/09/04 00:01:41 mrg Exp $ */ 1/* $NetBSD: asm.h,v 1.56 2020/04/17 14:19:43 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Ralph Campbell. 8 * Ralph Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -257,27 +257,29 @@ _C_LABEL(x): @@ -257,27 +257,29 @@ _C_LABEL(x):
257 jal _C_LABEL(printf); \ 257 jal _C_LABEL(printf); \
258 nop; \ 258 nop; \
259 MSG(msg) 259 MSG(msg)
260 260
261#define MSG(msg) \ 261#define MSG(msg) \
262 .rdata; \ 262 .rdata; \
2639: .asciz msg; \ 2639: .asciz msg; \
264 .text 264 .text
265 265
266#define ASMSTR(str) \ 266#define ASMSTR(str) \
267 .asciz str; \ 267 .asciz str; \
268 .align 3 268 .align 3
269 269
270#define RCSID(name) .pushsection ".ident"; .asciz name; .popsection 270#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 271 .asciz x; \
 272 .popsection
271 273
272/* 274/*
273 * XXX retain dialects XXX 275 * XXX retain dialects XXX
274 */ 276 */
275#define ALEAF(x) XLEAF(x) 277#define ALEAF(x) XLEAF(x)
276#define NLEAF(x) LEAF_NOPROFILE(x) 278#define NLEAF(x) LEAF_NOPROFILE(x)
277#define NON_LEAF(x, fsize, retpc) NESTED(x, fsize, retpc) 279#define NON_LEAF(x, fsize, retpc) NESTED(x, fsize, retpc)
278#define NNON_LEAF(x, fsize, retpc) NESTED_NOPROFILE(x, fsize, retpc) 280#define NNON_LEAF(x, fsize, retpc) NESTED_NOPROFILE(x, fsize, retpc)
279 281
280#if defined(__mips_o32) 282#if defined(__mips_o32)
281#define SZREG 4 283#define SZREG 4
282#else 284#else
283#define SZREG 8 285#define SZREG 8

cvs diff -r1.1 -r1.2 src/sys/arch/or1k/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/or1k/include/asm.h 2014/09/03 19:34:26 1.1
+++ src/sys/arch/or1k/include/asm.h 2020/04/17 14:19:44 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.1 2014/09/03 19:34:26 matt Exp $ */ 1/* $NetBSD: asm.h,v 1.2 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -73,27 +73,29 @@ @@ -73,27 +73,29 @@
73 73
74#ifdef __PIC__ 74#ifdef __PIC__
75#define PLT(x) plt(x) 75#define PLT(x) plt(x)
76#define PIC_GOTSETUP(r) \ 76#define PIC_GOTSETUP(r) \
77 l.jal 999f ;\ 77 l.jal 999f ;\
78 l.nop ;\ 78 l.nop ;\
79999: l.movhi r,gotpchi(_GLOBAL_OFFSET_TABLE_+0) ;\ 79999: l.movhi r,gotpchi(_GLOBAL_OFFSET_TABLE_+0) ;\
80 l.ori r,r,gotpclo(_GLOBAL_OFFSET_TABLE_+4) ;\ 80 l.ori r,r,gotpclo(_GLOBAL_OFFSET_TABLE_+4) ;\
81 l.add r,r,r9 81 l.add r,r,r9
82#else 82#else
83#define PLT(x) x 83#define PLT(x) x
84#endif 84#endif
85 85
86#define __RCSID(x) .pushsection ".ident"; .asciz x; .popsection 86#define __RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 87 .asciz x; \
 88 .popsection
87#define RCSID(x) __RCSID(x) 89#define RCSID(x) __RCSID(x)
88 90
89#define WEAK_ALIAS(alias,sym) \ 91#define WEAK_ALIAS(alias,sym) \
90 .weak alias; \ 92 .weak alias; \
91 alias = sym 93 alias = sym
92 94
93/* 95/*
94 * STRONG_ALIAS: create a strong alias. 96 * STRONG_ALIAS: create a strong alias.
95 */ 97 */
96#define STRONG_ALIAS(alias,sym) \ 98#define STRONG_ALIAS(alias,sym) \
97 .globl alias; \ 99 .globl alias; \
98 alias = sym 100 alias = sym
99 101

cvs diff -r1.49 -r1.50 src/sys/arch/powerpc/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/powerpc/include/asm.h 2020/03/01 23:23:36 1.49
+++ src/sys/arch/powerpc/include/asm.h 2020/04/17 14:19:44 1.50
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.49 2020/03/01 23:23:36 rin Exp $ */ 1/* $NetBSD: asm.h,v 1.50 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -146,27 +146,29 @@ y: .quad .##y,.TOC.@tocbase,0; \ @@ -146,27 +146,29 @@ y: .quad .##y,.TOC.@tocbase,0; \
146# define CALL(y) \ 146# define CALL(y) \
147 bl y 147 bl y
148 148
149# define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y)) 149# define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y))
150# define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE 150# define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
151#endif /* __LP64__ */ 151#endif /* __LP64__ */
152 152
153#define GLOBAL(y) _GLOBAL(_C_LABEL(y)) 153#define GLOBAL(y) _GLOBAL(_C_LABEL(y))
154 154
155#define ASMSTR .asciz 155#define ASMSTR .asciz
156 156
157#undef __RCSID 157#undef __RCSID
158#define RCSID(x) __RCSID(x) 158#define RCSID(x) __RCSID(x)
159#define __RCSID(x) .pushsection .ident; .asciz x; .popsection 159#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 160 .asciz x; \
 161 .popsection
160 162
161#ifdef __ELF__ 163#ifdef __ELF__
162# define WEAK_ALIAS(alias,sym) \ 164# define WEAK_ALIAS(alias,sym) \
163 .weak alias; \ 165 .weak alias; \
164 alias = sym 166 alias = sym
165#endif /* __ELF__ */ 167#endif /* __ELF__ */
166/* 168/*
167 * STRONG_ALIAS: create a strong alias. 169 * STRONG_ALIAS: create a strong alias.
168 */ 170 */
169#define STRONG_ALIAS(alias,sym) \ 171#define STRONG_ALIAS(alias,sym) \
170 .globl alias; \ 172 .globl alias; \
171 alias = sym 173 alias = sym
172 174

cvs diff -r1.4 -r1.5 src/sys/arch/riscv/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/riscv/include/asm.h 2020/03/14 16:12:16 1.4
+++ src/sys/arch/riscv/include/asm.h 2020/04/17 14:19:44 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.4 2020/03/14 16:12:16 skrll Exp $ */ 1/* $NetBSD: asm.h,v 1.5 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -105,27 +105,29 @@ @@ -105,27 +105,29 @@
105 la a0, 9f; \ 105 la a0, 9f; \
106 call _C_LABEL(printf); \ 106 call _C_LABEL(printf); \
107 MSG(msg) 107 MSG(msg)
108 108
109#define MSG(msg) \ 109#define MSG(msg) \
110 .pushsection .rodata.str1.8,"aMS",@progbits,1; \ 110 .pushsection .rodata.str1.8,"aMS",@progbits,1; \
1119: .asciiz msg; \ 1119: .asciiz msg; \
112 .popsection 112 .popsection
113 113
114#define ASMSTR(str) \ 114#define ASMSTR(str) \
115 .asciiz str; \ 115 .asciiz str; \
116 .align 3 116 .align 3
117 117
118#define __RCSID(name) .pushsection ".ident"; .asciz name; .popsection 118#define __RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 119 .asciz x; \
 120 .popsection
119#define RCSID(name) __RCSID(name) 121#define RCSID(name) __RCSID(name)
120 122
121#if defined(_LP64) 123#if defined(_LP64)
122#define SZREG 8 124#define SZREG 8
123#else 125#else
124#define SZREG 4 126#define SZREG 4
125#endif 127#endif
126 128
127#define ALSK 15 /* stack alignment */ 129#define ALSK 15 /* stack alignment */
128#define ALMASK -15 /* stack alignment */ 130#define ALMASK -15 /* stack alignment */
129#define SZFPREG 8 131#define SZFPREG 8
130#define FP_L fld 132#define FP_L fld
131#define FP_S fsd 133#define FP_S fsd

cvs diff -r1.28 -r1.29 src/sys/arch/sh3/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/sh3/include/asm.h 2013/09/12 15:36:17 1.28
+++ src/sys/arch/sh3/include/asm.h 2020/04/17 14:19:44 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.28 2013/09/12 15:36:17 joerg Exp $ */ 1/* $NetBSD: asm.h,v 1.29 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -193,27 +193,29 @@ @@ -193,27 +193,29 @@
193 193
194#define CALL_DATUM(function, lpcs) \ 194#define CALL_DATUM(function, lpcs) \
195 .long function 195 .long function
196 196
197#define CALL_DATUM_LOCAL(function, lpcs) \ 197#define CALL_DATUM_LOCAL(function, lpcs) \
198 .long function 198 .long function
199 199
200#endif /* !__PIC__ */ 200#endif /* !__PIC__ */
201 201
202 202
203#define ASMSTR .asciz 203#define ASMSTR .asciz
204 204
205#ifdef __ELF__ 205#ifdef __ELF__
206#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection 206#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 207 .asciz x; \
 208 .popsection
207#else 209#else
208#define RCSID(x) .text; .asciz x 210#define RCSID(x) .text; .asciz x
209#endif 211#endif
210 212
211#ifdef NO_KERNEL_RCSIDS 213#ifdef NO_KERNEL_RCSIDS
212#define __KERNEL_RCSID(_n, _s) /* nothing */ 214#define __KERNEL_RCSID(_n, _s) /* nothing */
213#else 215#else
214#define __KERNEL_RCSID(_n, _s) RCSID(_s) 216#define __KERNEL_RCSID(_n, _s) RCSID(_s)
215#endif 217#endif
216 218
217#ifdef __ELF__ 219#ifdef __ELF__
218#define WEAK_ALIAS(alias,sym) \ 220#define WEAK_ALIAS(alias,sym) \
219 .weak _C_LABEL(alias); \ 221 .weak _C_LABEL(alias); \

cvs diff -r1.22 -r1.23 src/sys/arch/sparc/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/sparc/include/asm.h 2015/08/23 11:01:24 1.22
+++ src/sys/arch/sparc/include/asm.h 2020/04/17 14:19:44 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.22 2015/08/23 11:01:24 joerg Exp $ */ 1/* $NetBSD: asm.h,v 1.23 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1994 Allen Briggs 4 * Copyright (c) 1994 Allen Briggs
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Gleaned from locore.s and sun3 asm.h which had the following copyrights: 7 * Gleaned from locore.s and sun3 asm.h which had the following copyrights:
8 * locore.s: 8 * locore.s:
9 * Copyright (c) 1988 University of Utah. 9 * Copyright (c) 1988 University of Utah.
10 * Copyright (c) 1982, 1990 The Regents of the University of California. 10 * Copyright (c) 1982, 1990 The Regents of the University of California.
11 * sun3/include/asm.h: 11 * sun3/include/asm.h:
12 * Copyright (c) 1993 Adam Glass 12 * Copyright (c) 1993 Adam Glass
13 * Copyright (c) 1990 The Regents of the University of California. 13 * Copyright (c) 1990 The Regents of the University of California.
14 * 14 *
@@ -147,27 +147,29 @@ @@ -147,27 +147,29 @@
147#endif 147#endif
148 148
149#define ENTRY(name) _ENTRY(_C_LABEL(name)); _PROF_PROLOGUE 149#define ENTRY(name) _ENTRY(_C_LABEL(name)); _PROF_PROLOGUE
150#define ENTRY_NOPROFILE(name) _ENTRY(_C_LABEL(name)) 150#define ENTRY_NOPROFILE(name) _ENTRY(_C_LABEL(name))
151#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)); _PROF_PROLOGUE 151#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)); _PROF_PROLOGUE
152#define FUNC(name) ASENTRY(name) 152#define FUNC(name) ASENTRY(name)
153#define RODATA(name) .align 4; .text; .globl _C_LABEL(name); \ 153#define RODATA(name) .align 4; .text; .globl _C_LABEL(name); \
154 OTYPE(_C_LABEL(name)); _C_LABEL(name): 154 OTYPE(_C_LABEL(name)); _C_LABEL(name):
155#define END(y) .size y, . - y 155#define END(y) .size y, . - y
156 156
157#define ASMSTR .asciz 157#define ASMSTR .asciz
158 158
159#ifdef __ELF__ 159#ifdef __ELF__
160#define RCSID(name) .pushsection ".ident"; .asciz name; .popsection 160#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 161 .asciz x; \
 162 .popsection
161#else 163#else
162#define RCSID(name) .asciz name 164#define RCSID(name) .asciz name
163#endif 165#endif
164 166
165#ifdef NO_KERNEL_RCSIDS 167#ifdef NO_KERNEL_RCSIDS
166#define __KERNEL_RCSID(_n, _s) /* nothing */ 168#define __KERNEL_RCSID(_n, _s) /* nothing */
167#else 169#else
168#define __KERNEL_RCSID(_n, _s) RCSID(_s) 170#define __KERNEL_RCSID(_n, _s) RCSID(_s)
169#endif 171#endif
170 172
171#ifdef __ELF__ 173#ifdef __ELF__
172#define WEAK_ALIAS(alias,sym) \ 174#define WEAK_ALIAS(alias,sym) \
173 .weak alias; \ 175 .weak alias; \

cvs diff -r1.27 -r1.28 src/sys/arch/vax/include/asm.h (expand / switch to unified diff)

--- src/sys/arch/vax/include/asm.h 2018/04/25 09:23:00 1.27
+++ src/sys/arch/vax/include/asm.h 2020/04/17 14:19:44 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: asm.h,v 1.27 2018/04/25 09:23:00 ragge Exp $ */ 1/* $NetBSD: asm.h,v 1.28 2020/04/17 14:19:44 joerg Exp $ */
2/* 2/*
3 * Copyright (c) 1982, 1993 3 * Copyright (c) 1982, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -69,27 +69,29 @@ @@ -69,27 +69,29 @@
69#ifdef GPROF 69#ifdef GPROF
70# define _PROF_PROLOGUE \ 70# define _PROF_PROLOGUE \
71 .data; 1:; .long 0; .text; moval 1b,%r0; jsb _ASM_LABEL(__mcount) 71 .data; 1:; .long 0; .text; moval 1b,%r0; jsb _ASM_LABEL(__mcount)
72#else 72#else
73# define _PROF_PROLOGUE 73# define _PROF_PROLOGUE
74#endif 74#endif
75 75
76#define ENTRY(x, regs) _ENTRY(_C_LABEL(x), regs); _PROF_PROLOGUE 76#define ENTRY(x, regs) _ENTRY(_C_LABEL(x), regs); _PROF_PROLOGUE
77#define NENTRY(x, regs) _ENTRY(_C_LABEL(x), regs) 77#define NENTRY(x, regs) _ENTRY(_C_LABEL(x), regs)
78#define ASENTRY(x, regs) _ENTRY(_ASM_LABEL(x), regs); _PROF_PROLOGUE 78#define ASENTRY(x, regs) _ENTRY(_ASM_LABEL(x), regs); _PROF_PROLOGUE
79#define END(x) .size _C_LABEL(x),.-_C_LABEL(x) 79#define END(x) .size _C_LABEL(x),.-_C_LABEL(x)
80 80
81#define ALTENTRY(x) .globl _C_LABEL(x); _C_LABEL(x): 81#define ALTENTRY(x) .globl _C_LABEL(x); _C_LABEL(x):
82#define RCSID(name) .pushsection ".ident"; .asciz name; .popsection 82#define RCSID(x) .pushsection ".ident","MS",@progbits,1; \
 83 .asciz x; \
 84 .popsection
83 85
84#ifdef NO_KERNEL_RCSIDS 86#ifdef NO_KERNEL_RCSIDS
85#define __KERNEL_RCSID(_n, _s) /* nothing */ 87#define __KERNEL_RCSID(_n, _s) /* nothing */
86#else 88#else
87#define __KERNEL_RCSID(_n, _s) RCSID(_s) 89#define __KERNEL_RCSID(_n, _s) RCSID(_s)
88#endif 90#endif
89 91
90#define WEAK_ALIAS(alias,sym) \ 92#define WEAK_ALIAS(alias,sym) \
91 .weak alias; \ 93 .weak alias; \
92 alias = sym 94 alias = sym
93 95
94/* 96/*
95 * STRONG_ALIAS: create a strong alias. 97 * STRONG_ALIAS: create a strong alias.

cvs diff -r1.55 -r1.56 src/sys/sys/cdefs_elf.h (expand / switch to unified diff)

--- src/sys/sys/cdefs_elf.h 2020/03/22 00:25:01 1.55
+++ src/sys/sys/cdefs_elf.h 2020/04/17 14:19:44 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cdefs_elf.h,v 1.55 2020/03/22 00:25:01 kamil Exp $ */ 1/* $NetBSD: cdefs_elf.h,v 1.56 2020/04/17 14:19:44 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University. 4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Author: Chris G. Demetriou 7 * Author: Chris G. Demetriou
8 * 8 *
9 * Permission to use, copy, modify and distribute this software and 9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright 10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the 11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions 12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation. 13 * thereof, and that both notices appear in supporting documentation.
14 * 14 *
@@ -126,32 +126,32 @@ @@ -126,32 +126,32 @@
126#define __ifunc(name, resolver) \ 126#define __ifunc(name, resolver) \
127 __asm(".globl " _C_LABEL_STRING(#name) "\n" \ 127 __asm(".globl " _C_LABEL_STRING(#name) "\n" \
128 ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \ 128 ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \
129 _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) 129 _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver))
130#define __hidden_ifunc(name, resolver) \ 130#define __hidden_ifunc(name, resolver) \
131 __asm(".globl " _C_LABEL_STRING(#name) "\n" \ 131 __asm(".globl " _C_LABEL_STRING(#name) "\n" \
132 ".hidden " _C_LABEL_STRING(#name) "\n" \ 132 ".hidden " _C_LABEL_STRING(#name) "\n" \
133 ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \ 133 ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \
134 _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) 134 _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver))
135#endif 135#endif
136 136
137#if __STDC__ 137#if __STDC__
138#define __SECTIONSTRING(_sec, _str) \ 138#define __SECTIONSTRING(_sec, _str) \
139 __asm(".pushsection " #_sec "\n" \ 139 __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n" \
140 ".asciz \"" _str "\"\n" \ 140 ".asciz \"" _str "\"\n" \
141 ".popsection") 141 ".popsection")
142#else 142#else
143#define __SECTIONSTRING(_sec, _str) \ 143#define __SECTIONSTRING(_sec, _str) \
144 __asm(".pushsection _sec\n" \ 144 __asm(".pushsection " _sec ",\"MS\",@progbits,1\n" \
145 ".asciz \"" _str "\"\n" \ 145 ".asciz \"" _str "\"\n" \
146 ".popsection") 146 ".popsection")
147#endif 147#endif
148 148
149#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s) 149#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)
150 150
151#define __RCSID(_s) __IDSTRING(rcsid,_s) 151#define __RCSID(_s) __IDSTRING(rcsid,_s)
152#define __SCCSID(_s) 152#define __SCCSID(_s)
153#define __SCCSID2(_s) 153#define __SCCSID2(_s)
154#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s) 154#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s)
155 155
156#define __KERNEL_RCSID(_n, _s) __RCSID(_s) 156#define __KERNEL_RCSID(_n, _s) __RCSID(_s)
157#define __KERNEL_SCCSID(_n, _s) 157#define __KERNEL_SCCSID(_n, _s)