15796c8dcSSimon Schubert /* Table of stab names for the BFD library.
2*ef5ccd6cSJohn Marino Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000, 2005, 2007, 2012
35796c8dcSSimon Schubert Free Software Foundation, Inc.
45796c8dcSSimon Schubert Written by Cygnus Support.
55796c8dcSSimon Schubert
65796c8dcSSimon Schubert This file is part of BFD, the Binary File Descriptor library.
75796c8dcSSimon Schubert
85796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify
95796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by
105796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or
115796c8dcSSimon Schubert (at your option) any later version.
125796c8dcSSimon Schubert
135796c8dcSSimon Schubert This program is distributed in the hope that it will be useful,
145796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of
155796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
165796c8dcSSimon Schubert GNU General Public License for more details.
175796c8dcSSimon Schubert
185796c8dcSSimon Schubert You should have received a copy of the GNU General Public License
195796c8dcSSimon Schubert along with this program; if not, write to the Free Software
205796c8dcSSimon Schubert Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
215796c8dcSSimon Schubert MA 02110-1301, USA. */
225796c8dcSSimon Schubert
23*ef5ccd6cSJohn Marino #include "sysdep.h"
245796c8dcSSimon Schubert #include "bfd.h"
255796c8dcSSimon Schubert
265796c8dcSSimon Schubert #define ARCH_SIZE 32 /* Value doesn't matter. */
275796c8dcSSimon Schubert #include "libaout.h"
285796c8dcSSimon Schubert #include "aout/aout64.h"
295796c8dcSSimon Schubert
305796c8dcSSimon Schubert /* Ignore duplicate stab codes; just return the string for the first
315796c8dcSSimon Schubert one. */
325796c8dcSSimon Schubert #define __define_stab(NAME, CODE, STRING) __define_name(CODE, STRING)
335796c8dcSSimon Schubert #define __define_stab_duplicate(NAME, CODE, STRING)
345796c8dcSSimon Schubert
355796c8dcSSimon Schubert /* These are not really stab symbols, but it is
365796c8dcSSimon Schubert convenient to have them here for the sake of nm.
375796c8dcSSimon Schubert For completeness, we could also add N_TEXT etc, but those
385796c8dcSSimon Schubert are never needed, since nm treats those specially. */
395796c8dcSSimon Schubert #define EXTRA_SYMBOLS \
405796c8dcSSimon Schubert __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
415796c8dcSSimon Schubert __define_name (N_SETT, "SETT")/* Text set element symbol */ \
425796c8dcSSimon Schubert __define_name (N_SETD, "SETD")/* Data set element symbol */ \
435796c8dcSSimon Schubert __define_name (N_SETB, "SETB")/* Bss set element symbol */ \
445796c8dcSSimon Schubert __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
455796c8dcSSimon Schubert __define_name (N_INDR, "INDR") \
465796c8dcSSimon Schubert __define_name (N_WARNING, "WARNING")
475796c8dcSSimon Schubert
485796c8dcSSimon Schubert const char *
bfd_get_stab_name(code)495796c8dcSSimon Schubert bfd_get_stab_name (code)
505796c8dcSSimon Schubert int code;
515796c8dcSSimon Schubert {
525796c8dcSSimon Schubert switch (code)
535796c8dcSSimon Schubert {
545796c8dcSSimon Schubert #define __define_name(val, str) case val: return str;
555796c8dcSSimon Schubert #include "aout/stab.def"
565796c8dcSSimon Schubert EXTRA_SYMBOLS
575796c8dcSSimon Schubert }
585796c8dcSSimon Schubert
595796c8dcSSimon Schubert return (const char *) 0;
605796c8dcSSimon Schubert }
61