stab-syms.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Table of stab names for the BFD library.
  2. Copyright (C) 1990-2022 Free Software Foundation, Inc.
  3. Written by Cygnus Support.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program 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
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #include "sysdep.h"
  18. #include "bfd.h"
  19. #define ARCH_SIZE 32 /* Value doesn't matter. */
  20. #include "libaout.h"
  21. #include "aout/aout64.h"
  22. /* Ignore duplicate stab codes; just return the string for the first
  23. one. */
  24. #define __define_stab(NAME, CODE, STRING) __define_name(CODE, STRING)
  25. #define __define_stab_duplicate(NAME, CODE, STRING)
  26. /* These are not really stab symbols, but it is
  27. convenient to have them here for the sake of nm.
  28. For completeness, we could also add N_TEXT etc, but those
  29. are never needed, since nm treats those specially. */
  30. #define EXTRA_SYMBOLS \
  31. __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
  32. __define_name (N_SETT, "SETT")/* Text set element symbol */ \
  33. __define_name (N_SETD, "SETD")/* Data set element symbol */ \
  34. __define_name (N_SETB, "SETB")/* Bss set element symbol */ \
  35. __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
  36. __define_name (N_INDR, "INDR") \
  37. __define_name (N_WARNING, "WARNING")
  38. const char *
  39. bfd_get_stab_name (int code)
  40. {
  41. switch (code)
  42. {
  43. #define __define_name(val, str) case val: return str;
  44. #include "aout/stab.def"
  45. EXTRA_SYMBOLS
  46. }
  47. return (const char *) 0;
  48. }