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