(Limits on Resources): New node.
[glibc/history.git] / gnu-stabs.h
blobfe8c60d0d107e4e7a5ed63b06c041cb32959d11b
1 /* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 Cambridge, MA 02139, USA. */
19 #ifndef __GNU_STABS_H
21 #define __GNU_STABS_H 1
23 #ifdef HAVE_GNU_LD
25 /* Alias a function:
26 function_alias(creat, _creat, int, (file, mode),
27 DEFUN(creat, (file, mode),
28 CONST char *file AND int mode))
29 Yes, this is very repetitive. Nothing you can do about it, so shut up. */
30 #define function_alias(name, _name, type, args, defun) \
31 symbol_alias (_name, name);
33 #define function_alias_void(name, _name, args, defun) \
34 symbol_alias (_name, name);
36 /* Make references to ALIAS refer to SYMBOL. */
37 #ifdef __STDC__
38 #define symbol_alias(symbol, alias) \
39 asm(".stabs \"" "_" #alias "\",11,0,0,0\n"\
40 ".stabs \"" "_" #symbol "\",1,0,0,0")
41 #else
42 /* Your assembler better grok this right! */
43 #define symbol_alias(symbol, alias) \
44 asm(".stabs \"_/**/alias\",11,0,0,0\n.stabs \"_/**/symbol\",1,0,0,0")
45 #endif
47 /* Issue a warning message from the linker whenever SYMBOL is referenced. */
48 #ifdef __STDC__
49 #define warn_references(symbol, msg) \
50 asm(".stabs \"" msg "\",30,0,0,0\n" \
51 ".stabs \"_" #symbol "\",1,0,0,0")
52 #else
53 #define warn_references(symbol, msg) \
54 asm(".stabs msg,30,0,0,0\n.stabs \"_/**/symbol\",1,0,0,0")
55 #endif
57 #ifdef __STDC__
58 #define stub_warning(name) \
59 warn_references(name, \
60 "warning: " #name " is not implemented and will always fail")
61 #else
62 #define stub_warning(name) \
63 warn_references(name, \
64 "warning: name is not implemented and will always fail")
65 #endif
67 #ifdef __STDC__
68 #define text_set_element(set, symbol) \
69 asm(".stabs \"_" #set "\",23,0,0,_" #symbol)
70 #define data_set_element(set, symbol) \
71 asm(".stabs \"_" #set "\",25,0,0,_" #symbol)
72 #define bss_set_element(set, symbol) \
73 asm(".stabs \"_" #set "\",27,0,0,_" #symbol)
74 #else
75 #define text_set_element(set, symbol) \
76 asm(".stabs \"_/**/set\",23,0,0,_/**/symbol")
77 #define data_set_element(set, symbol) \
78 asm(".stabs \"_/**/set\",25,0,0,_/**/symbol")
79 #define bss_set_element(set, symbol) \
80 asm(".stabs \"_/**/set\",27,0,0,_/**/symbol")
81 #endif
83 #else /* No GNU stabs. */
85 #define function_alias(name, _name, type, args, defun) \
86 type defun { return _name args; }
88 #define function_alias_void(name, _name, args, defun) \
89 void defun { _name args; }
91 #endif /* GNU stabs. */
93 #endif /* gnu-stabs.h */