obj-som.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SOM object file format.
  2. Copyright (C) 1993-2015 Free Software Foundation, Inc.
  3. This file is part of GAS, the GNU Assembler.
  4. GAS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. GAS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GAS; see the file COPYING. If not, write to the Free
  14. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  15. 02110-1301, USA.
  16. Written by the Center for Software Science at the University of Utah
  17. and by Cygnus Support. */
  18. #ifndef _OBJ_SOM_H
  19. #define _OBJ_SOM_H
  20. #define OBJ_SOM 1
  21. #include "bfd/som.h"
  22. #include "som/reloc.h"
  23. #include "targ-cpu.h"
  24. #ifndef FALSE
  25. #define FALSE 0
  26. #define TRUE !FALSE
  27. #endif
  28. /* should be conditional on address size! */
  29. #define som_symbol(asymbol) ((som_symbol_type *) (&(asymbol)->the_bfd))
  30. extern void som_file_symbol (char *);
  31. extern void som_frob_file (void);
  32. extern void obj_som_version (int);
  33. extern void obj_som_init_stab_section (segT);
  34. extern void obj_som_copyright (int);
  35. extern void obj_som_compiler (int);
  36. #define obj_symbol_new_hook(s) {;}
  37. /* SOM has several attributes for spaces/subspaces which can not
  38. be easily expressed in BFD. We use these macros to trigger calls
  39. into the SOM BFD backend to set these attributes. */
  40. #define obj_set_section_attributes bfd_som_set_section_attributes
  41. #define obj_set_subsection_attributes bfd_som_set_subsection_attributes
  42. /* Likewise for symbol types. */
  43. #define obj_set_symbol_type bfd_som_set_symbol_type
  44. /* Stabs go in a separate sections. GDB expects to find them in sections
  45. with the names $GDB_SYMBOLS$ and $GDB_STRINGS$ rather than .stab and
  46. .stabstr. */
  47. #define SEPARATE_STAB_SECTIONS 1
  48. #define STAB_SECTION_NAME "$GDB_SYMBOLS$"
  49. #define STAB_STRING_SECTION_NAME "$GDB_STRINGS$"
  50. /* We use INIT_STAB_SECTION to record the space/subspace relationships
  51. for the various debugging sections. */
  52. #define INIT_STAB_SECTION(seg) obj_som_init_stab_section (seg)
  53. /* We'll be updating the magic 1st stab entry once the entire assembly
  54. fail has been processed. */
  55. #define obj_frob_file() som_frob_file()
  56. #endif /* _OBJ_SOM_H */