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