obj.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* obj.h - defines the object dependent hooks for all object
  2. format backends.
  3. Copyright (C) 1987-2022 Free Software Foundation, Inc.
  4. This file is part of GAS, the GNU Assembler.
  5. GAS 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, or (at your option)
  8. any later version.
  9. GAS 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 GAS; see the file COPYING. If not, write to the Free
  15. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  16. 02110-1301, USA. */
  17. char *obj_default_output_file_name (void);
  18. void obj_emit_relocations (char **where, fixS * fixP,
  19. relax_addressT segment_address_in_file);
  20. void obj_emit_strings (char **where);
  21. void obj_emit_symbols (char **where, symbolS * symbols);
  22. #ifndef obj_read_begin_hook
  23. void obj_read_begin_hook (void);
  24. #endif
  25. #ifndef obj_symbol_new_hook
  26. void obj_symbol_new_hook (symbolS * symbolP);
  27. #endif
  28. void obj_symbol_to_chars (char **where, symbolS * symbolP);
  29. extern const pseudo_typeS obj_pseudo_table[];
  30. struct format_ops {
  31. int flavor;
  32. unsigned dfl_leading_underscore : 1;
  33. unsigned emit_section_symbols : 1;
  34. void (*begin) (void);
  35. void (*app_file) (const char *, int);
  36. void (*frob_symbol) (symbolS *, int *);
  37. void (*frob_file) (void);
  38. void (*frob_file_before_adjust) (void);
  39. void (*frob_file_before_fix) (void);
  40. void (*frob_file_after_relocs) (void);
  41. bfd_vma (*s_get_size) (symbolS *);
  42. void (*s_set_size) (symbolS *, bfd_vma);
  43. bfd_vma (*s_get_align) (symbolS *);
  44. void (*s_set_align) (symbolS *, bfd_vma);
  45. int (*s_get_other) (symbolS *);
  46. void (*s_set_other) (symbolS *, int);
  47. int (*s_get_desc) (symbolS *);
  48. void (*s_set_desc) (symbolS *, int);
  49. int (*s_get_type) (symbolS *);
  50. void (*s_set_type) (symbolS *, int);
  51. void (*copy_symbol_attributes) (symbolS *, symbolS *);
  52. void (*generate_asm_lineno) (void);
  53. void (*process_stab) (segT, int, const char *, int, int, int);
  54. int (*separate_stab_sections) (void);
  55. void (*init_stab_section) (segT);
  56. int (*sec_sym_ok_for_reloc) (asection *);
  57. void (*pop_insert) (void);
  58. /* For configurations using ECOFF_DEBUGGING, this callback is used. */
  59. void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *);
  60. void (*read_begin_hook) (void);
  61. void (*symbol_new_hook) (symbolS *);
  62. void (*symbol_clone_hook) (symbolS *, symbolS *);
  63. void (*adjust_symtab) (void);
  64. };
  65. extern const struct format_ops elf_format_ops;
  66. extern const struct format_ops ecoff_format_ops;
  67. extern const struct format_ops coff_format_ops;
  68. extern const struct format_ops aout_format_ops;
  69. #ifndef this_format
  70. COMMON const struct format_ops *this_format;
  71. #endif
  72. /* end of obj.h */