Commit | Line | Data |
---|---|---|
4c63da97 | 1 | /* Multiple object format emulation. |
4b95cf5c | 2 | Copyright (C) 1995-2014 Free Software Foundation, Inc. |
4c63da97 AM |
3 | |
4 | This file is part of GAS, the GNU Assembler. | |
5 | ||
6 | GAS is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
ec2655a6 | 8 | the Free Software Foundation; either version 3, or (at your option) |
4c63da97 AM |
9 | any later version. |
10 | ||
11 | GAS is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GAS; see the file COPYING. If not, write to the Free | |
4b4da160 NC |
18 | Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA |
19 | 02110-1301, USA. */ | |
4c63da97 AM |
20 | |
21 | #ifndef _OBJ_MULTI_H | |
22 | #define _OBJ_MULTI_H | |
23 | ||
24 | #ifdef OBJ_HEADER | |
25 | #include OBJ_HEADER | |
26 | #else | |
252b5132 RH |
27 | |
28 | #include "emul.h" | |
29 | #include "targ-cpu.h" | |
30 | ||
4ca72d38 AM |
31 | #define OUTPUT_FLAVOR \ |
32 | (this_format->flavor) | |
33 | ||
5110c57e HPN |
34 | #define obj_begin() \ |
35 | (this_format->begin \ | |
36 | ? (*this_format->begin) () \ | |
37 | : (void) 0) | |
38 | ||
c04f5787 | 39 | #define obj_app_file(NAME, APPFILE) \ |
5110c57e | 40 | (this_format->app_file \ |
c04f5787 | 41 | ? (*this_format->app_file) (NAME, APPFILE) \ |
5110c57e HPN |
42 | : (void) 0) |
43 | ||
4ca72d38 | 44 | #define obj_frob_symbol(S,P) \ |
4c63da97 | 45 | (*this_format->frob_symbol) (S, &(P)) |
4ca72d38 AM |
46 | |
47 | #define obj_frob_file() \ | |
48 | (this_format->frob_file \ | |
4c63da97 | 49 | ? (*this_format->frob_file) () \ |
4ca72d38 AM |
50 | : (void) 0) |
51 | ||
339681c0 L |
52 | #define obj_frob_file_before_adjust() \ |
53 | (this_format->frob_file_before_adjust \ | |
54 | ? (*this_format->frob_file_before_adjust) () \ | |
55 | : (void) 0) | |
56 | ||
a161fe53 AM |
57 | #define obj_frob_file_before_fix() \ |
58 | (this_format->frob_file_before_fix \ | |
59 | ? (*this_format->frob_file_before_fix) () \ | |
60 | : (void) 0) | |
61 | ||
4c63da97 AM |
62 | #define obj_frob_file_after_relocs() \ |
63 | (this_format->frob_file_after_relocs \ | |
64 | ? (*this_format->frob_file_after_relocs) () \ | |
65 | : (void) 0) | |
4ca72d38 AM |
66 | |
67 | #define obj_ecoff_set_ext \ | |
4c63da97 | 68 | (*this_format->ecoff_set_ext) |
4ca72d38 AM |
69 | |
70 | #define obj_pop_insert \ | |
4c63da97 | 71 | (*this_format->pop_insert) |
4ca72d38 AM |
72 | |
73 | #define obj_read_begin_hook() \ | |
74 | (this_format->read_begin_hook \ | |
4c63da97 | 75 | ? (*this_format->read_begin_hook) () \ |
4ca72d38 AM |
76 | : (void) 0) |
77 | ||
4c63da97 AM |
78 | #define obj_symbol_new_hook(S) \ |
79 | (this_format->symbol_new_hook \ | |
80 | ? (*this_format->symbol_new_hook) (S) \ | |
81 | : (void) 0) | |
4ca72d38 | 82 | |
4cae74aa AM |
83 | #define obj_symbol_clone_hook(N, O) \ |
84 | (this_format->symbol_clone_hook \ | |
85 | ? (*this_format->symbol_clone_hook) (N, O) \ | |
86 | : (void) 0) | |
87 | ||
4c63da97 AM |
88 | #define obj_sec_sym_ok_for_reloc(A) \ |
89 | (this_format->sec_sym_ok_for_reloc \ | |
90 | ? (*this_format->sec_sym_ok_for_reloc) (A) \ | |
91 | : 0) | |
4ca72d38 | 92 | |
645ea3ea AM |
93 | #define obj_adjust_symtab() \ |
94 | (this_format->adjust_symtab \ | |
95 | ? (*this_format->adjust_symtab) () \ | |
96 | : (void) 0) | |
97 | ||
4ca72d38 | 98 | #define S_GET_SIZE \ |
4c63da97 | 99 | (*this_format->s_get_size) |
4ca72d38 | 100 | |
5110c57e HPN |
101 | #define S_SET_SIZE(S, N) \ |
102 | (this_format->s_set_size \ | |
103 | ? (*this_format->s_set_size) (S, N) \ | |
104 | : (void) 0) | |
4ca72d38 AM |
105 | |
106 | #define S_GET_ALIGN \ | |
4c63da97 | 107 | (*this_format->s_get_align) |
4ca72d38 | 108 | |
5110c57e HPN |
109 | #define S_SET_ALIGN(S, N) \ |
110 | (this_format->s_set_align \ | |
111 | ? (*this_format->s_set_align) (S, N) \ | |
112 | : (void) 0) | |
4c63da97 AM |
113 | |
114 | #define S_GET_OTHER \ | |
115 | (*this_format->s_get_other) | |
116 | ||
5110c57e HPN |
117 | #define S_SET_OTHER(S, O) \ |
118 | (this_format->s_set_other \ | |
119 | ? (*this_format->s_set_other) (S, O) \ | |
120 | : (void) 0) | |
121 | ||
4c63da97 AM |
122 | #define S_GET_DESC \ |
123 | (*this_format->s_get_desc) | |
4ca72d38 | 124 | |
5110c57e HPN |
125 | #define S_SET_DESC(S, D) \ |
126 | (this_format->s_set_desc \ | |
127 | ? (*this_format->s_set_desc) (S, D) \ | |
128 | : (void) 0) | |
129 | ||
130 | #define S_GET_TYPE \ | |
131 | (*this_format->s_get_desc) | |
132 | ||
133 | #define S_SET_TYPE(S, T) \ | |
134 | (this_format->s_set_type \ | |
135 | ? (*this_format->s_set_type) (S, T) \ | |
136 | : (void) 0) | |
137 | ||
4ca72d38 AM |
138 | #define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \ |
139 | (this_format->copy_symbol_attributes \ | |
4c63da97 | 140 | ? (*this_format->copy_symbol_attributes) (d, s) \ |
4ca72d38 AM |
141 | : (void) 0) |
142 | ||
143 | #define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \ | |
144 | (this_format->process_stab \ | |
4c63da97 | 145 | ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ |
4ca72d38 | 146 | : (void) 0) |
252b5132 | 147 | |
5110c57e HPN |
148 | #define SEPARATE_STAB_SECTIONS \ |
149 | ((*this_format->separate_stab_sections) ()) | |
150 | ||
151 | #define INIT_STAB_SECTION(S) \ | |
152 | (this_format->init_stab_section \ | |
153 | ? (*this_format->init_stab_section) (S) \ | |
154 | : (void) 0) | |
155 | ||
156 | #define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols) | |
157 | ||
60938e80 L |
158 | #define FAKE_LABEL_NAME (this_emulation->fake_label_name) |
159 | ||
252b5132 | 160 | #ifdef OBJ_MAYBE_ELF |
4c63da97 AM |
161 | /* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c |
162 | We also need various STAB defines for stab.c */ | |
4ca72d38 | 163 | #include "obj-elf.h" |
252b5132 | 164 | #endif |
4c63da97 | 165 | |
5110c57e HPN |
166 | #ifdef OBJ_MAYBE_AOUT |
167 | /* We want aout_process_stab in stabs.c for the aout table. Defining this | |
168 | macro will have no other effect. */ | |
169 | #define AOUT_STABS | |
170 | #endif | |
171 | ||
4c63da97 AM |
172 | #endif /* !OBJ_HEADER */ |
173 | #endif /* _OBJ_MULTI_H */ |