1169689Skan/* Table of stab names for the BFD library.
2169689Skan   Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000
3169689Skan   Free Software Foundation, Inc.
4169689Skan   Written by Cygnus Support.
5169689Skan
6169689SkanThis file is part of BFD, the Binary File Descriptor library.
7169689Skan
8169689SkanThis program is free software; you can redistribute it and/or modify
9169689Skanit under the terms of the GNU General Public License as published by
10169689Skanthe Free Software Foundation; either version 2 of the License, or
11169689Skan(at your option) any later version.
12169689Skan
13169689SkanThis program is distributed in the hope that it will be useful,
14169689Skanbut WITHOUT ANY WARRANTY; without even the implied warranty of
15169689SkanMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16169689SkanGNU General Public License for more details.
17169689Skan
18169689SkanYou should have received a copy of the GNU General Public License
19169689Skanalong with this program; if not, write to the Free Software
20169689SkanFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
21169689Skan
22169689Skan#include "bfd.h"
23169689Skan
24169689Skan#define ARCH_SIZE 32		/* Value doesn't matter.  */
25169689Skan#include "libaout.h"
26169689Skan#include "aout/aout64.h"
27169689Skan
28169689Skan/* Ignore duplicate stab codes; just return the string for the first
29169689Skan   one.  */
30169689Skan#define __define_stab(NAME, CODE, STRING) __define_name(CODE, STRING)
31169689Skan#define __define_stab_duplicate(NAME, CODE, STRING)
32169689Skan
33169689Skan/* These are not really stab symbols, but it is
34169689Skan   convenient to have them here for the sake of nm.
35169689Skan   For completeness, we could also add N_TEXT etc, but those
36169689Skan   are never needed, since nm treats those specially.  */
37169689Skan#define EXTRA_SYMBOLS \
38169689Skan  __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
39169689Skan  __define_name (N_SETT, "SETT")/* Text set element symbol */ \
40169689Skan  __define_name (N_SETD, "SETD")/* Data set element symbol */ \
41169689Skan  __define_name (N_SETB, "SETB")/* Bss set element symbol */ \
42169689Skan  __define_name (N_SETV, "SETV")/* Pointer to set vector in data area.  */ \
43169689Skan  __define_name (N_INDR, "INDR") \
44169689Skan  __define_name (N_WARNING, "WARNING")
45169689Skan
46169689Skanconst char *
47169689Skanbfd_get_stab_name (code)
48169689Skan     int code;
49169689Skan{
50169689Skan  switch (code)
51169689Skan    {
52169689Skan#define __define_name(val, str) case val: return str;
53169689Skan#include "aout/stab.def"
54169689Skan      EXTRA_SYMBOLS
55169689Skan    }
56169689Skan
57169689Skan  return (const char *) 0;
58169689Skan}
59169689Skan