Mark the .ident section as mergable string section to avoid redundant

entries.
This commit is contained in:
joerg 2020-04-17 14:19:43 +00:00
parent 568e57b236
commit 628289e37e
15 changed files with 57 additions and 33 deletions

View File

@ -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 @@ label: ASCIZ msg; \
* 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

View File

@ -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; \

View File

@ -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; \

View File

@ -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) \

View File

@ -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

View File

@ -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 @@ label: ASCIZ msg; \
#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

View File

@ -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
/*

View File

@ -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 @@ _C_LABEL(x):
.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

View File

@ -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) \

View File

@ -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 @@ y: .quad .##y,.TOC.@tocbase,0; \
#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) \

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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" \
__asm(".pushsection " _sec ",\"MS\",@progbits,1\n" \
".asciz \"" _str "\"\n" \
".popsection")
#endif