1103856Stjr/* Multiple object format emulation. 2103856Stjr Copyright (C) 1995-2022 Free Software Foundation, Inc. 3103856Stjr 4103856Stjr This file is part of GAS, the GNU Assembler. 5103856Stjr 6103856Stjr GAS is free software; you can redistribute it and/or modify 7103856Stjr it under the terms of the GNU General Public License as published by 8103856Stjr the Free Software Foundation; either version 3, or (at your option) 9103856Stjr any later version. 10103856Stjr 11103856Stjr GAS is distributed in the hope that it will be useful, 12103856Stjr but WITHOUT ANY WARRANTY; without even the implied warranty of 13103856Stjr MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14103856Stjr GNU General Public License for more details. 15103856Stjr 16103856Stjr You should have received a copy of the GNU General Public License 17103856Stjr along with GAS; see the file COPYING. If not, write to the Free 18103856Stjr Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 19103856Stjr 02110-1301, USA. */ 20103856Stjr 21103856Stjr#ifndef _OBJ_MULTI_H 22103856Stjr#define _OBJ_MULTI_H 23103856Stjr 24103856Stjr#ifdef OBJ_HEADER 25103856Stjr#include OBJ_HEADER 26103856Stjr#else 27103856Stjr 28103856Stjr#include "emul.h" 29103856Stjr#include "targ-cpu.h" 30103856Stjr 31103856Stjr#define OUTPUT_FLAVOR \ 32103856Stjr (this_format->flavor) 33103856Stjr 34103856Stjr#define obj_begin() \ 35103856Stjr (this_format->begin \ 36103856Stjr ? (*this_format->begin) () \ 37103856Stjr : (void) 0) 38128844Sobrien 39103856Stjr#define obj_app_file(NAME) \ 40103856Stjr (this_format->app_file \ 41103856Stjr ? (*this_format->app_file) (NAME) \ 42103856Stjr : (void) 0) 43103856Stjr 44149313Sstefanf#define obj_frob_symbol(S,P) \ 45103856Stjr (*this_format->frob_symbol) (S, &(P)) 46103856Stjr 47103856Stjr#define obj_frob_file() \ 48103856Stjr (this_format->frob_file \ 49103856Stjr ? (*this_format->frob_file) () \ 50103856Stjr : (void) 0) 51103856Stjr 52103856Stjr#define obj_frob_file_before_adjust() \ 53103856Stjr (this_format->frob_file_before_adjust \ 54103856Stjr ? (*this_format->frob_file_before_adjust) () \ 55103856Stjr : (void) 0) 56103856Stjr 57128822Sdas#define obj_frob_file_before_fix() \ 58103856Stjr (this_format->frob_file_before_fix \ 59103856Stjr ? (*this_format->frob_file_before_fix) () \ 60103856Stjr : (void) 0) 61103856Stjr 62103856Stjr#define obj_frob_file_after_relocs() \ 63103856Stjr (this_format->frob_file_after_relocs \ 64103856Stjr ? (*this_format->frob_file_after_relocs) () \ 65103856Stjr : (void) 0) 66103856Stjr 67103856Stjr#define obj_ecoff_set_ext \ 68103856Stjr (*this_format->ecoff_set_ext) 69103856Stjr 70103856Stjr#define obj_pop_insert \ 71103856Stjr (*this_format->pop_insert) 72103856Stjr 73103856Stjr#define obj_read_begin_hook() \ 74103856Stjr (this_format->read_begin_hook \ 75103856Stjr ? (*this_format->read_begin_hook) () \ 76103856Stjr : (void) 0) 77103856Stjr 78103856Stjr#define obj_symbol_new_hook(S) \ 79103856Stjr (this_format->symbol_new_hook \ 80117249Stjr ? (*this_format->symbol_new_hook) (S) \ 81117249Stjr : (void) 0) 82103856Stjr 83103856Stjr#define obj_symbol_clone_hook(N, O) \ 84103856Stjr (this_format->symbol_clone_hook \ 85103856Stjr ? (*this_format->symbol_clone_hook) (N, O) \ 86103856Stjr : (void) 0) 87125283Sdas 88103856Stjr#define obj_sec_sym_ok_for_reloc(A) \ 89103856Stjr (this_format->sec_sym_ok_for_reloc \ 90103856Stjr ? (*this_format->sec_sym_ok_for_reloc) (A) \ 91103856Stjr : 0) 92103856Stjr 93103856Stjr#define obj_adjust_symtab() \ 94103856Stjr (this_format->adjust_symtab \ 95103856Stjr ? (*this_format->adjust_symtab) () \ 96103856Stjr : (void) 0) 97103856Stjr 98157381Sphk#define S_GET_SIZE \ 99117249Stjr (*this_format->s_get_size) 100157381Sphk 101117249Stjr#define S_SET_SIZE(S, N) \ 102103856Stjr (this_format->s_set_size \ 103103856Stjr ? (*this_format->s_set_size) (S, N) \ 104103856Stjr : (void) 0) 105103856Stjr 106187422Sdas#define S_GET_ALIGN \ 107187422Sdas (*this_format->s_get_align) 108103856Stjr 109103856Stjr#define S_SET_ALIGN(S, N) \ 110103856Stjr (this_format->s_set_align \ 111103856Stjr ? (*this_format->s_set_align) (S, N) \ 112103856Stjr : (void) 0) 113103856Stjr 114103856Stjr#define S_GET_OTHER \ 115103856Stjr (*this_format->s_get_other) 116103856Stjr 117103856Stjr#define S_SET_OTHER(S, O) \ 118103856Stjr (this_format->s_set_other \ 119103856Stjr ? (*this_format->s_set_other) (S, O) \ 120103856Stjr : (void) 0) 121103856Stjr 122103856Stjr#define S_GET_DESC \ 123103856Stjr (*this_format->s_get_desc) 124103856Stjr 125103856Stjr#define S_SET_DESC(S, D) \ 126103856Stjr (this_format->s_set_desc \ 127103856Stjr ? (*this_format->s_set_desc) (S, D) \ 128103856Stjr : (void) 0) 129103856Stjr 130103856Stjr#define S_GET_TYPE \ 131103856Stjr (*this_format->s_get_desc) 132103856Stjr 133103856Stjr#define S_SET_TYPE(S, T) \ 134103856Stjr (this_format->s_set_type \ 135103856Stjr ? (*this_format->s_set_type) (S, T) \ 136103856Stjr : (void) 0) 137103856Stjr 138103856Stjr#define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \ 139103856Stjr (this_format->copy_symbol_attributes \ 140103856Stjr ? (*this_format->copy_symbol_attributes) (d, s) \ 141103856Stjr : (void) 0) 142103856Stjr 143103856Stjr#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \ 144103856Stjr (this_format->process_stab \ 145103856Stjr ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ 146105317Stjr : (void) 0) 147128002Stjr 148103856Stjr#define SEPARATE_STAB_SECTIONS \ 149103856Stjr ((*this_format->separate_stab_sections) ()) 150103856Stjr 151103856Stjr#define INIT_STAB_SECTION(S) \ 152103856Stjr (this_format->init_stab_section \ 153103856Stjr ? (*this_format->init_stab_section) (S) \ 154103856Stjr : (void) 0) 155103856Stjr 156103856Stjr#define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols) 157103856Stjr 158103856Stjr#ifndef INITIALIZING_EMULS 159103856Stjr/* We want to use the default FAKE_LABEL_NAME in as.c. */ 160103856Stjr#define FAKE_LABEL_NAME (this_emulation->fake_label_name) 161103856Stjr#endif 162103856Stjr 163103856Stjr#ifdef OBJ_MAYBE_ELF 164103856Stjr/* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c 165103856Stjr We also need various STAB defines for stab.c */ 166103856Stjr#include "obj-elf.h" 167103856Stjr#endif 168103856Stjr 169103856Stjr#ifdef OBJ_MAYBE_AOUT 170103856Stjr/* We want aout_process_stab in stabs.c for the aout table. Defining this 171103856Stjr macro will have no other effect. */ 172103856Stjr#define AOUT_STABS 173103856Stjr#endif 174103856Stjr 175103856Stjr#endif /* !OBJ_HEADER */ 176103856Stjr#endif /* _OBJ_MULTI_H */ 177103856Stjr