Back to index

cell-binutils  2.17cvs20070401
obj-multi.h
Go to the documentation of this file.
00001 /* Multiple object format emulation.
00002    Copyright 1995, 1996, 1997, 1999, 2000, 2002, 2004
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of GAS, the GNU Assembler.
00006 
00007    GAS is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GAS is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GAS; see the file COPYING.  If not, write to the Free
00019    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 #ifndef _OBJ_MULTI_H
00023 #define _OBJ_MULTI_H
00024 
00025 #ifdef OBJ_HEADER
00026 #include OBJ_HEADER
00027 #else
00028 
00029 #include "emul.h"
00030 #include "targ-cpu.h"
00031 
00032 #define OUTPUT_FLAVOR                                   \
00033        (this_format->flavor)
00034 
00035 #define obj_begin()                              \
00036        (this_format->begin                       \
00037         ? (*this_format->begin) ()               \
00038         : (void) 0)
00039 
00040 #define obj_app_file(NAME, APPFILE)                     \
00041        (this_format->app_file                           \
00042         ? (*this_format->app_file) (NAME, APPFILE)      \
00043         : (void) 0)
00044 
00045 #define obj_frob_symbol(S,P)                            \
00046        (*this_format->frob_symbol) (S, &(P))
00047 
00048 #define obj_frob_file()                                 \
00049        (this_format->frob_file                          \
00050         ? (*this_format->frob_file) ()                  \
00051         : (void) 0)
00052 
00053 #define obj_frob_file_before_adjust()                   \
00054        (this_format->frob_file_before_adjust            \
00055         ? (*this_format->frob_file_before_adjust) ()    \
00056         : (void) 0)
00057 
00058 #define obj_frob_file_before_fix()               \
00059        (this_format->frob_file_before_fix        \
00060         ? (*this_format->frob_file_before_fix) ()       \
00061         : (void) 0)
00062 
00063 #define obj_frob_file_after_relocs()                    \
00064        (this_format->frob_file_after_relocs             \
00065         ? (*this_format->frob_file_after_relocs) ()     \
00066         : (void) 0)
00067 
00068 #define obj_ecoff_set_ext                        \
00069        (*this_format->ecoff_set_ext)
00070 
00071 #define obj_pop_insert                                  \
00072        (*this_format->pop_insert)
00073 
00074 #define obj_read_begin_hook()                           \
00075        (this_format->read_begin_hook                    \
00076         ? (*this_format->read_begin_hook) ()            \
00077         : (void) 0)
00078 
00079 #define obj_symbol_new_hook(S)                          \
00080        (this_format->symbol_new_hook                    \
00081         ? (*this_format->symbol_new_hook) (S)           \
00082         : (void) 0)
00083 
00084 #define obj_sec_sym_ok_for_reloc(A)                     \
00085        (this_format->sec_sym_ok_for_reloc        \
00086         ? (*this_format->sec_sym_ok_for_reloc) (A)      \
00087         : 0)
00088 
00089 #define S_GET_SIZE                               \
00090        (*this_format->s_get_size)
00091 
00092 #define S_SET_SIZE(S, N)                         \
00093        (this_format->s_set_size                  \
00094         ? (*this_format->s_set_size) (S, N)             \
00095         : (void) 0)
00096 
00097 #define S_GET_ALIGN                              \
00098        (*this_format->s_get_align)
00099 
00100 #define S_SET_ALIGN(S, N)                        \
00101        (this_format->s_set_align                 \
00102         ? (*this_format->s_set_align) (S, N)            \
00103         : (void) 0)
00104 
00105 #define S_GET_OTHER                              \
00106        (*this_format->s_get_other)
00107 
00108 #define S_SET_OTHER(S, O)                        \
00109        (this_format->s_set_other                 \
00110         ? (*this_format->s_set_other) (S, O)            \
00111         : (void) 0)
00112 
00113 #define S_GET_DESC                               \
00114        (*this_format->s_get_desc)
00115 
00116 #define S_SET_DESC(S, D)                         \
00117        (this_format->s_set_desc                  \
00118         ? (*this_format->s_set_desc) (S, D)             \
00119         : (void) 0)
00120 
00121 #define S_GET_TYPE                               \
00122        (*this_format->s_get_desc)
00123 
00124 #define S_SET_TYPE(S, T)                         \
00125        (this_format->s_set_type                  \
00126         ? (*this_format->s_set_type) (S, T)             \
00127         : (void) 0)
00128 
00129 #define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s)                 \
00130        (this_format->copy_symbol_attributes             \
00131         ? (*this_format->copy_symbol_attributes) (d, s) \
00132         : (void) 0)
00133 
00134 #define OBJ_PROCESS_STAB(SEG,W,S,T,O,D)                 \
00135        (this_format->process_stab                \
00136         ? (*this_format->process_stab) (SEG,W,S,T,O,D)  \
00137         : (void) 0)
00138 
00139 #define SEPARATE_STAB_SECTIONS \
00140        ((*this_format->separate_stab_sections) ())
00141 
00142 #define INIT_STAB_SECTION(S)                            \
00143        (this_format->init_stab_section                  \
00144         ? (*this_format->init_stab_section) (S)  \
00145         : (void) 0)
00146 
00147 #define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols)
00148 
00149 #define FAKE_LABEL_NAME (this_emulation->fake_label_name)
00150 
00151 #ifdef OBJ_MAYBE_ELF
00152 /* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c
00153    We also need various STAB defines for stab.c  */
00154 #include "obj-elf.h"
00155 #endif
00156 
00157 #ifdef OBJ_MAYBE_AOUT
00158 /* We want aout_process_stab in stabs.c for the aout table.  Defining this
00159    macro will have no other effect.  */
00160 #define AOUT_STABS
00161 #endif
00162 
00163 #endif /* !OBJ_HEADER */
00164 #endif /* _OBJ_MULTI_H */