Garbage-collect.

This commit is contained in:
thorpej 1999-03-20 01:40:25 +00:00
parent 4c847c9dd7
commit a77ccfe460
10 changed files with 19 additions and 452 deletions

View File

@ -1,112 +1,8 @@
/* $NetBSD: cdefs.h,v 1.10 1997/11/04 23:09:23 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*/
/* $NetBSD: cdefs.h,v 1.11 1999/03/20 01:40:25 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#define _C_LABEL(x) x
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __ELF__
#define __DO_NOT_DO_WEAK__ /* NO WEAK SYMS IN LIBC YET */
#ifndef __DO_NOT_DO_WEAK__
#define __indr_reference(sym,alias) /* nada, since we do weak refs */
#endif /* !__DO_NOT_DO_WEAK__ */
#ifdef __STDC__
#ifndef __DO_NOT_DO_WEAK__
#define __weak_alias(alias,sym) \
__asm__(".weak " #alias " ; " #alias " = " #sym);
#endif /* !__DO_NOT_DO_WEAK__ */
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text");
#else /* !__STDC__ */
#ifndef __DO_NOT_DO_WEAK__
#define __weak_alias(alias,sym) \
__asm__(".weak alias ; alias = sym");
#endif /* !__DO_NOT_DO_WEAK__ */
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning.sym ; .ascii msg ; .text");
#endif /* !__STDC__ */
#else /* !__ELF__ */
/*
* Very little to do if not ELF: we support neither indirect or
* weak references, and don't do anything with warnings.
*/
#define __warn_references(sym,msg) /* nothing */
#endif /* !__ELF__ */
#ifdef _KERNEL
#ifdef __ELF__
#ifdef __STDC__
#define __KERNEL_SECTIONSTRING(_sec, _str) \
__asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
#else
#define __KERNEL_SECTIONSTRING(_sec, _str) \
__asm__(".section _sec ; .asciz _str ; .text")
#endif
#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s)
#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s)
#else /* __ELF__ */
#define __KERNEL_RCSID(_n, _s) \
static const char __CONCAT(rcsid,_n)[] \
__attribute__ ((unused)) = _s
#define __KERNEL_COPYRIGHT(_n, _s) \
static const char __CONCAT(copyright,_n)[] \
__attribute__ ((unused)) = _s
#endif /* __ELF__ */
#ifdef NO_KERNEL_RCSIDS
#undef __KERNEL_RCSID
#define __KERNEL_RCSID(_n, _s) /* nothing */
#endif
#endif /* _KERNEL */
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,37 +1,8 @@
/* $NetBSD: cdefs.h,v 1.6 1998/06/25 21:54:35 mark Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.7 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#define _C_LABEL(x) __CONCAT(_,x)
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else /* __STDC__ */
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif /* __STDC__ */
#else /* __GNUC__ */
#define __warn_references(sym,msg)
#endif /* __GNUC__ */
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,69 +1,8 @@
/* $NetBSD: cdefs.h,v 1.5 1999/01/11 11:02:16 christos Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.6 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#ifdef __ELF__
# define _C_LABEL(x) x
#else
# define _C_LABEL(x) __CONCAT(_,x)
#endif
#ifdef __GNUC__
# define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __ELF__
# define __DO_NOT_DO_WEAK__ /* NO WEAK SYMS IN LIBC YET */
# ifndef __DO_NOT_DO_WEAK__
# define __indr_reference(sym,alias) /* nada, since we do weak refs */
# endif /* !__DO_NOT_DO_WEAK__ */
# ifdef __STDC__
# ifndef __DO_NOT_DO_WEAK__
# define __weak_alias(alias,sym) \
__asm__(".weak " #alias " ; " #alias " = " #sym);
# endif /* !__DO_NOT_DO_WEAK__ */
# define __warn_references(sym,msg) \
__asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text");
# else /* !__STDC__ */
# ifndef __DO_NOT_DO_WEAK__
# define __weak_alias(alias,sym) \
__asm__(".weak alias ; alias = sym");
# endif /* !__DO_NOT_DO_WEAK__ */
# define __warn_references(sym,msg) \
__asm__(".section .gnu.warning.sym ; .ascii msg ; .text");
# endif /* __STDC__ */
#else /* !__ELF__ */
# ifdef __GNUC__
# ifdef __STDC__
# define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
# define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
# else /* __STDC__ */
# define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
# define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
# endif /* __STDC__ */
# else /* __GNUC__ */
# define __warn_references(sym,msg)
# endif /* __GNUC__ */
#endif /* __ELF__ */
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,37 +1,8 @@
/* $NetBSD: cdefs.h,v 1.5 1998/02/28 12:20:25 veego Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.6 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _M68K_CDEFS_H_
#define _M68K_CDEFS_H_
#define _C_LABEL(x) __CONCAT(_,x)
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else /* __STDC__ */
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif /* __STDC__ */
#else /* __GNUC__ */
#define __warn_references(sym,msg)
#endif /* __GNUC__ */
/* No arch-specific cdefs. */
#endif /* !_M68K_CDEFS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cdefs.h,v 1.9 1999/01/31 00:55:41 castor Exp $ */
/* $NetBSD: cdefs.h,v 1.10 1999/03/20 01:40:26 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@ -41,42 +41,4 @@
#define _MIPS_BSD_API_N32 _MIPS_SIM_NABI32
#define _MIPS_BSD_API_LP64 _MIPS_SIM_ABI64
#define _C_LABEL(x) x
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#define __indr_references(sym,msg) /* nothing */
#if defined __GNUC__ && defined __STDC__
#define __warn_references(sym, msg) \
static const char __evoke_link_warning_##sym[] \
__attribute__ ((section (".gnu.warning." #sym))) = msg;
#else
#define __warn_references(sym,msg) /* nothing */
#endif
/* Kernel-only .sections for kernel copyright */
#ifdef _KERNEL
#ifdef __STDC__
#define __KERNEL_SECTIONSTRING(_sec, _str) \
__asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
#else
#define __KERNEL_SECTIONSTRING(_sec, _str) \
__asm__(".section _sec ; .asciz _str ; .text")
#endif
#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s)
#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s)
#ifdef NO_KERNEL_RCSIDS
#undef __KERNEL_RCSID
#define __KERNEL_RCSID(_n, _s) /* nothing */
#endif
#endif /* _KERNEL */
#endif /* !_MIPS_CDEFS_H_ */

View File

@ -1,37 +1,8 @@
/* $NetBSD: cdefs.h,v 1.5 1998/10/07 08:54:59 matthias Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.6 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#define _C_LABEL(x) __CONCAT(_,x)
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else /* __STDC__ */
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif /* __STDC__ */
#else /* __GNUC__ */
#define __warn_references(sym,msg)
#endif /* __GNUC__ */
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,40 +1,8 @@
/* $NetBSD: cdefs.h,v 1.4 1997/11/04 23:10:11 thorpej Exp $ */
/* $NetBSD: cdefs.h,v 1.5 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#define _C_LABEL(x) x
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#define __DO_NOT_DO_WEAK__ /* NO WEAK SYMS IN LIBC YET */
#ifndef __DO_NOT_DO_WEAK__
#define __indr_reference(sym, alias) /* use weak symbols instead */
#endif
#ifdef __STDC__
#ifndef __DO_NOT_DO_WEAK__
#define __weak_alias(alias, sym) \
__asm__(".weak " #alias " ; " #alias " = " #sym);
#endif
#define __warn_references(sym, msg) \
__asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text");
#else /* ! __STDC__ */
#ifndef __DO_NOT_DO_WEAK__
#define __weak_alias(alias, sym) \
__asm__(".weak alias ; alias = sym");
#endif
#define __warn_references(sym, msg) \
__asm__(".section .gnu.warning.sym ; .ascii msg ; .text");
#endif /* __STDC__ */
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,49 +1,8 @@
/* $NetBSD: cdefs.h,v 1.7 1998/07/01 17:14:51 tv Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.8 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#ifdef __ELF__
#define _C_LABEL(x) x
#else
#define _C_LABEL(x) __CONCAT(_,x)
#endif
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif
#else
#define __indr_reference(sym,alias)
#define __warn_references(sym,msg)
#endif
#ifdef __ELF__
/* XXX: we should be able to do weak as __indr_reference, and __weak_alias. */
#undef __indr_reference
#undef __warn_references
#define __warn_references(sym,msg)
#endif
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,49 +1,8 @@
/* $NetBSD: cdefs.h,v 1.2 1998/07/07 03:05:03 eeh Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.3 1999/03/20 01:40:26 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#ifdef __ELF__
#define _C_LABEL(x) x
#else
#define _C_LABEL(x) __CONCAT(_,x)
#endif
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif
#else
#define __indr_reference(sym,alias)
#define __warn_references(sym,msg)
#endif
#ifdef __ELF__
/* XXX: we should be able to do weak as __indr_reference, and __weak_alias. */
#undef __indr_reference
#undef __warn_references
#define __warn_references(sym,msg)
#endif
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */

View File

@ -1,37 +1,8 @@
/* $NetBSD: cdefs.h,v 1.5 1998/08/22 12:12:38 ragge Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
/* $NetBSD: cdefs.h,v 1.6 1999/03/20 01:40:27 thorpej Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#define _C_LABEL(x) __CONCAT(_,x)
#ifdef __GNUC__
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
#endif
#ifdef __GNUC__
#ifdef __STDC__
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
#else
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0");
#endif
#else
#define __warn_references(sym,msg)
#endif
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */