Automatic date update in version.in
[binutils-gdb.git] / gas / obj.h
blob972fa928126c692a7cf094af49e6491e4c8d90cb
1 /* obj.h - defines the object dependent hooks for all object
2 format backends.
4 Copyright (C) 1987-2024 Free Software Foundation, Inc.
6 This file is part of GAS, the GNU Assembler.
8 GAS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 GAS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GAS; see the file COPYING. If not, write to the Free
20 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21 02110-1301, USA. */
23 char *obj_default_output_file_name (void);
24 void obj_emit_relocations (char **where, fixS * fixP,
25 relax_addressT segment_address_in_file);
26 void obj_emit_strings (char **where);
27 void obj_emit_symbols (char **where, symbolS * symbols);
28 #ifndef obj_read_begin_hook
29 void obj_read_begin_hook (void);
30 #endif
32 #ifndef obj_symbol_new_hook
33 void obj_symbol_new_hook (symbolS * symbolP);
34 #endif
36 void obj_symbol_to_chars (char **where, symbolS * symbolP);
38 extern const pseudo_typeS obj_pseudo_table[];
40 struct ecoff_extr;
42 struct format_ops {
43 int flavor;
44 unsigned dfl_leading_underscore : 1;
45 unsigned emit_section_symbols : 1;
46 void (*begin) (void);
47 void (*end) (void);
48 void (*app_file) (const char *);
49 void (*assign_symbol) (symbolS *);
50 void (*frob_symbol) (symbolS *, int *);
51 void (*frob_file) (void);
52 void (*frob_file_before_adjust) (void);
53 void (*frob_file_before_fix) (void);
54 void (*frob_file_after_relocs) (void);
55 bfd_vma (*s_get_size) (symbolS *);
56 void (*s_set_size) (symbolS *, bfd_vma);
57 bfd_vma (*s_get_align) (symbolS *);
58 void (*s_set_align) (symbolS *, bfd_vma);
59 int (*s_get_other) (symbolS *);
60 void (*s_set_other) (symbolS *, int);
61 int (*s_get_desc) (symbolS *);
62 void (*s_set_desc) (symbolS *, int);
63 int (*s_get_type) (symbolS *);
64 void (*s_set_type) (symbolS *, int);
65 void (*copy_symbol_attributes) (symbolS *, symbolS *);
66 void (*process_stab) (int, const char *, int, int, int);
67 int (*separate_stab_sections) (void);
68 void (*init_stab_section) (segT, segT);
69 int (*sec_sym_ok_for_reloc) (asection *);
70 void (*pop_insert) (void);
71 /* For configurations using ECOFF_DEBUGGING, this callback is used. */
72 void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *);
74 void (*read_begin_hook) (void);
75 void (*symbol_new_hook) (symbolS *);
76 void (*symbol_clone_hook) (symbolS *, symbolS *);
77 void (*adjust_symtab) (void);
80 extern const struct format_ops elf_format_ops;
81 extern const struct format_ops ecoff_format_ops;
82 extern const struct format_ops coff_format_ops;
83 extern const struct format_ops aout_format_ops;
85 #ifdef USE_EMULATIONS
86 COMMON const struct format_ops *this_format;
87 #endif
89 /* end of obj.h */