Source-Changes-HG archive

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

[src/trunk]: src/sys Mark the .ident section as mergable string section to av...



details:   https://anonhg.NetBSD.org/src/rev/9247cc53a788
branches:  trunk
changeset: 930924:9247cc53a788
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Apr 17 14:19:43 2020 +0000

description:
Mark the .ident section as mergable string section to avoid redundant
entries.

diffstat:

 sys/arch/alpha/include/asm.h   |  6 ++++--
 sys/arch/amd64/include/asm.h   |  6 ++++--
 sys/arch/arm/include/asm.h     |  6 ++++--
 sys/arch/hppa/include/asm.h    |  6 +++---
 sys/arch/i386/include/asm.h    |  6 ++++--
 sys/arch/ia64/include/asm.h    |  6 ++++--
 sys/arch/m68k/include/asm.h    |  6 +++---
 sys/arch/mips/include/asm.h    |  6 ++++--
 sys/arch/or1k/include/asm.h    |  6 ++++--
 sys/arch/powerpc/include/asm.h |  6 ++++--
 sys/arch/riscv/include/asm.h   |  6 ++++--
 sys/arch/sh3/include/asm.h     |  6 ++++--
 sys/arch/sparc/include/asm.h   |  6 ++++--
 sys/arch/vax/include/asm.h     |  6 ++++--
 sys/sys/cdefs_elf.h            |  6 +++---
 15 files changed, 57 insertions(+), 33 deletions(-)

diffs (truncated from 304 to 300 lines):

diff -r 8761cb59520f -r 9247cc53a788 sys/arch/alpha/include/asm.h
--- a/sys/arch/alpha/include/asm.h      Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/alpha/include/asm.h      Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.36 2017/01/14 21:58:17 christos Exp $ */
+/* $NetBSD: asm.h,v 1.37 2020/04/17 14:19:43 joerg Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -643,7 +643,9 @@
  * Kernel RCS ID tag and copyright macros
  */
 #define        __SECTIONSTRING(_sec, _str)                             \
-       .pushsection _sec ; .asciz _str ; .popsection
+       .pushsection _sec,"MS",@progbits,1;                     \
+       .asciz x;                                               \
+       .popsection
 
 #ifdef _KERNEL
 
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/amd64/include/asm.h
--- a/sys/arch/amd64/include/asm.h      Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/amd64/include/asm.h      Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.19 2014/05/22 14:59:01 uebayasi Exp $        */
+/*     $NetBSD: asm.h,v 1.20 2020/04/17 14:19:43 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -112,7 +112,9 @@
 
 #define        ASMSTR          .asciz
 
-#define RCSID(x)       .pushsection ".ident"; .asciz x; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 
 #define        WEAK_ALIAS(alias,sym)                                           \
        .weak alias;                                                    \
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/arm/include/asm.h
--- a/sys/arch/arm/include/asm.h        Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/arm/include/asm.h        Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.31 2020/04/13 05:40:25 maxv Exp $    */
+/*     $NetBSD: asm.h,v 1.32 2020/04/17 14:19:43 joerg Exp $   */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -221,7 +221,9 @@
 #define        PIC_SYM(x,y)    x
 #endif /* __PIC__ */
 
-#define RCSID(x)       .pushsection ".ident"; .asciz x; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 
 #define        WEAK_ALIAS(alias,sym)                                           \
        .weak alias;                                                    \
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/hppa/include/asm.h
--- a/sys/arch/hppa/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/hppa/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.16 2019/04/16 12:25:17 skrll Exp $   */
+/*     $NetBSD: asm.h,v 1.17 2020/04/17 14:19:43 joerg Exp $   */
 
 /*     $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */
 
@@ -99,8 +99,8 @@
 #define ALTENTRY(x) ! .export x, entry ! .label x
 #define EXIT(x) ! .exit ! .procend ! .size x, .-x
 
-#define RCSID(x)       .pushsection ".ident"           !\
-                       .asciz x                        !\
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
                        .popsection
 
 #define WEAK_ALIAS(alias,sym)                          \
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/i386/include/asm.h
--- a/sys/arch/i386/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/i386/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.42 2016/05/15 15:26:04 chs Exp $     */
+/*     $NetBSD: asm.h,v 1.43 2020/04/17 14:19:43 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -181,7 +181,9 @@
 #define        ASMSTR          .asciz
 
 #ifdef __ELF__
-#define RCSID(x)       .pushsection ".ident"; .asciz x; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #else
 #define RCSID(x)       .text; .asciz x
 #endif
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/ia64/include/asm.h
--- a/sys/arch/ia64/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/ia64/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.7 2014/03/14 17:36:03 cherry Exp $   */
+/*     $NetBSD: asm.h,v 1.8 2020/04/17 14:19:43 joerg Exp $    */
 
 /* -
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -203,7 +203,9 @@
 
 
 #ifdef __ELF__
-#define RCSID(name)            .pushsection ".ident"; .asciz name; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #else
 #define RCSID(name)            .asciz name
 #endif
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/m68k/include/asm.h
--- a/sys/arch/m68k/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/m68k/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.33 2013/09/12 15:36:17 joerg Exp $   */
+/*     $NetBSD: asm.h,v 1.34 2020/04/17 14:19:43 joerg Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -139,8 +139,8 @@
 #define ALTENTRY(name, rname)  _ENTRY(_C_LABEL(name))
 #endif
 
-#define RCSID(x)       .pushsection ".ident"   ;       \
-                       .asciz x                ;       \
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
                        .popsection
 
 /*
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/mips/include/asm.h
--- a/sys/arch/mips/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/mips/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.55 2018/09/04 00:01:41 mrg Exp $     */
+/*     $NetBSD: asm.h,v 1.56 2020/04/17 14:19:43 joerg Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -267,7 +267,9 @@
        .asciz str;                     \
        .align  3
 
-#define        RCSID(name)     .pushsection ".ident"; .asciz name; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 
 /*
  * XXX retain dialects XXX
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/or1k/include/asm.h
--- a/sys/arch/or1k/include/asm.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/or1k/include/asm.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.1 2014/09/03 19:34:26 matt Exp $ */
+/* $NetBSD: asm.h,v 1.2 2020/04/17 14:19:44 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -83,7 +83,9 @@
 #define        PLT(x)                  x
 #endif
 
-#define __RCSID(x)     .pushsection ".ident"; .asciz x; .popsection
+#define __RCSID(x)     .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #define RCSID(x)       __RCSID(x)
 
 #define        WEAK_ALIAS(alias,sym)                                           \
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/powerpc/include/asm.h
--- a/sys/arch/powerpc/include/asm.h    Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/powerpc/include/asm.h    Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.49 2020/03/01 23:23:36 rin Exp $     */
+/*     $NetBSD: asm.h,v 1.50 2020/04/17 14:19:44 joerg Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -156,7 +156,9 @@
 
 #undef __RCSID
 #define RCSID(x)       __RCSID(x)
-#define        __RCSID(x)      .pushsection .ident; .asciz x; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 
 #ifdef __ELF__
 # define WEAK_ALIAS(alias,sym)                                         \
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/riscv/include/asm.h
--- a/sys/arch/riscv/include/asm.h      Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/riscv/include/asm.h      Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.4 2020/03/14 16:12:16 skrll Exp $    */
+/*     $NetBSD: asm.h,v 1.5 2020/04/17 14:19:44 joerg Exp $    */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -115,7 +115,9 @@
        .asciiz str;                    \
        .align  3
 
-#define        __RCSID(name)   .pushsection ".ident"; .asciz name; .popsection
+#define __RCSID(x)     .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #define RCSID(name)    __RCSID(name)
 
 #if defined(_LP64)
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/sh3/include/asm.h
--- a/sys/arch/sh3/include/asm.h        Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/sh3/include/asm.h        Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.28 2013/09/12 15:36:17 joerg Exp $   */
+/*     $NetBSD: asm.h,v 1.29 2020/04/17 14:19:44 joerg Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -203,7 +203,9 @@
 #define        ASMSTR          .asciz
 
 #ifdef __ELF__
-#define RCSID(x)       .pushsection ".ident"; .asciz x; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #else
 #define        RCSID(x)        .text; .asciz x
 #endif
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/sparc/include/asm.h
--- a/sys/arch/sparc/include/asm.h      Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/sparc/include/asm.h      Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.22 2015/08/23 11:01:24 joerg Exp $ */
+/*     $NetBSD: asm.h,v 1.23 2020/04/17 14:19:44 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 Allen Briggs
@@ -157,7 +157,9 @@
 #define ASMSTR                 .asciz
 
 #ifdef __ELF__
-#define RCSID(name)            .pushsection ".ident"; .asciz name; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 #else
 #define RCSID(name)            .asciz name
 #endif
diff -r 8761cb59520f -r 9247cc53a788 sys/arch/vax/include/asm.h
--- a/sys/arch/vax/include/asm.h        Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/arch/vax/include/asm.h        Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.27 2018/04/25 09:23:00 ragge Exp $ */
+/*     $NetBSD: asm.h,v 1.28 2020/04/17 14:19:44 joerg Exp $ */
 /*
  * Copyright (c) 1982, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -79,7 +79,9 @@
 #define END(x)                 .size _C_LABEL(x),.-_C_LABEL(x)
 
 #define ALTENTRY(x)            .globl _C_LABEL(x); _C_LABEL(x):
-#define RCSID(name)            .pushsection ".ident"; .asciz name; .popsection
+#define RCSID(x)       .pushsection ".ident","MS",@progbits,1;         \
+                       .asciz x;                                       \
+                       .popsection
 
 #ifdef NO_KERNEL_RCSIDS
 #define __KERNEL_RCSID(_n, _s)  /* nothing */
diff -r 8761cb59520f -r 9247cc53a788 sys/sys/cdefs_elf.h
--- a/sys/sys/cdefs_elf.h       Fri Apr 17 13:36:48 2020 +0000
+++ b/sys/sys/cdefs_elf.h       Fri Apr 17 14:19:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs_elf.h,v 1.55 2020/03/22 00:25:01 kamil Exp $     */
+/*     $NetBSD: cdefs_elf.h,v 1.56 2020/04/17 14:19:44 joerg Exp $     */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -136,12 +136,12 @@
 
 #if __STDC__
 #define        __SECTIONSTRING(_sec, _str)                                     \
-       __asm(".pushsection " #_sec "\n"                                \
+       __asm(".pushsection " #_sec ",\"MS\",@progbits,1\n"             \
              ".asciz \"" _str "\"\n"                                   \
              ".popsection")
 #else
 #define        __SECTIONSTRING(_sec, _str)                                     \
-       __asm(".pushsection _sec\n"                                     \



Home | Main Index | Thread Index | Old Index