stab-syms.c revision 218822
143105Sdfr/* Table of stab names for the BFD library. 243105Sdfr Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000 343105Sdfr Free Software Foundation, Inc. 443105Sdfr Written by Cygnus Support. 543105Sdfr 643105SdfrThis file is part of BFD, the Binary File Descriptor library. 743105Sdfr 843105SdfrThis program is free software; you can redistribute it and/or modify 943105Sdfrit under the terms of the GNU General Public License as published by 1043105Sdfrthe Free Software Foundation; either version 2 of the License, or 1143105Sdfr(at your option) any later version. 1243105Sdfr 1343105SdfrThis program is distributed in the hope that it will be useful, 1443105Sdfrbut WITHOUT ANY WARRANTY; without even the implied warranty of 1543105SdfrMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1643105SdfrGNU General Public License for more details. 1743105Sdfr 1843105SdfrYou should have received a copy of the GNU General Public License 1943105Sdfralong with this program; if not, write to the Free Software 2043105SdfrFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 2143105Sdfr 2243105Sdfr#include "bfd.h" 2343105Sdfr 2443105Sdfr#define ARCH_SIZE 32 /* Value doesn't matter. */ 2543105Sdfr#include "libaout.h" 2643105Sdfr#include "aout/aout64.h" 27116181Sobrien 28116181Sobrien/* Ignore duplicate stab codes; just return the string for the first 29116181Sobrien one. */ 3043105Sdfr#define __define_stab(NAME, CODE, STRING) __define_name(CODE, STRING) 3143105Sdfr#define __define_stab_duplicate(NAME, CODE, STRING) 3243105Sdfr 3343105Sdfr/* These are not really stab symbols, but it is 3443105Sdfr convenient to have them here for the sake of nm. 3543105Sdfr For completeness, we could also add N_TEXT etc, but those 3643105Sdfr are never needed, since nm treats those specially. */ 3748104Syokota#define EXTRA_SYMBOLS \ 3843105Sdfr __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \ 3948104Syokota __define_name (N_SETT, "SETT")/* Text set element symbol */ \ 4043105Sdfr __define_name (N_SETD, "SETD")/* Data set element symbol */ \ 4148104Syokota __define_name (N_SETB, "SETB")/* Bss set element symbol */ \ 4248104Syokota __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \ 4348104Syokota __define_name (N_INDR, "INDR") \ 4448104Syokota __define_name (N_WARNING, "WARNING") 4548104Syokota 4643105Sdfrconst char * 4743105Sdfrbfd_get_stab_name (code) 4843105Sdfr int code; 4943105Sdfr{ 50114384Speter switch (code) 5143105Sdfr { 52114384Speter#define __define_name(val, str) case val: return str; 5343105Sdfr#include "aout/stab.def" 5443105Sdfr EXTRA_SYMBOLS 5543105Sdfr } 5643105Sdfr 5743105Sdfr return (const char *) 0; 5843105Sdfr} 5943105Sdfr