PR/14639: Ben Harris: Stick the rcsid's in the data segment via inline

assembly, so that we don't get duplicate symbol errors when we have multiple
__KERNEL_RCSID's
This commit is contained in:
christos 2001-12-04 16:44:55 +00:00
parent bb58ba64b2
commit f6f0ceea17
1 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cdefs_aout.h,v 1.6 2001/11/13 19:52:39 tv Exp $ */
/* $NetBSD: cdefs_aout.h,v 1.7 2001/12/04 16:44:55 christos Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@ -45,8 +45,11 @@
#define __warn_references(sym,msg)
#endif
#define __IDSTRING(name,string) \
static const char name[] __attribute__((__unused__)) = string
#define __IDSTRING(_n,_s) \
__asm__(".data ; .asciz \"" _s "\" ; .text")
#undef __KERNEL_RCSID
#define __KERNEL_RCSID(_n,_s) __IDSTRING(__CONCAT(rcsid,_n),_s)
#define __RCSID(_s) __IDSTRING(rcsid,_s)
#define __SCCSID(_s)
@ -54,11 +57,11 @@
#define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
#if defined(USE_KERNEL_RCSIDS) || !defined(_KERNEL)
#define __KERNEL_RCSID(_n, _s) __IDSTRING(__CONCAT(rcsid,_n),_s)
#define __KERNEL_RCSID(_n,_s) __IDSTRING(__CONCAT(rcsid,_n),_s)
#else
#define __KERNEL_RCSID(_n, _s)
#define __KERNEL_RCSID(_n,_s)
#endif
#define __KERNEL_SCCSID(_n, _s)
#define __KERNEL_SCCSID(_n,_s)
#define __KERNEL_COPYRIGHT(_n, _s) __IDSTRING(__CONCAT(copyright,_n),_s)
#endif /* !_SYS_CDEFS_AOUT_H_ */