1  /* ECOFF object file format header file.
       2     Copyright (C) 1993-2023 Free Software Foundation, Inc.
       3     Contributed by Cygnus Support.
       4     Written by Ian Lance Taylor <ian@cygnus.com>.
       5  
       6     This file is part of GAS.
       7  
       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.
      12  
      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.
      17  
      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.  */
      22  
      23  #define OBJ_ECOFF 1
      24  
      25  /* Use the generic ECOFF debugging code.  */
      26  #define ECOFF_DEBUGGING 1
      27  
      28  #define OUTPUT_FLAVOR bfd_target_ecoff_flavour
      29  
      30  #include "targ-cpu.h"
      31  
      32  #include "ecoff.h"
      33  
      34  /* For each gas symbol we keep track of which file it came from, of
      35     whether we have generated an ECOFF symbol for it, and whether the
      36     symbols is undefined (this last is needed to distinguish a .extern
      37     symbols from a .comm symbol).  */
      38  
      39  struct ecoff_sy_obj
      40  {
      41    struct efdr *ecoff_file;
      42    struct localsym *ecoff_symbol;
      43    valueT ecoff_extern_size;
      44  };
      45  
      46  #define OBJ_SYMFIELD_TYPE struct ecoff_sy_obj
      47  
      48  /* Modify the ECOFF symbol.  */
      49  #define obj_frob_symbol(symp, punt) ecoff_frob_symbol (symp)
      50  
      51  /* Set section VMAs and GP.  */
      52  #define obj_frob_file_before_fix() ecoff_frob_file_before_fix ()
      53  
      54  /* This is used to write the symbolic data in the format that BFD
      55     expects it.  */
      56  #define obj_frob_file() ecoff_frob_file ()
      57  
      58  /* We use the ECOFF functions as our hooks.  */
      59  #define obj_read_begin_hook ecoff_read_begin_hook
      60  #define obj_symbol_new_hook ecoff_symbol_new_hook
      61  #define obj_symbol_clone_hook ecoff_symbol_clone_hook
      62  
      63  /* Record file switches in the ECOFF symbol table.  */
      64  #define obj_app_file(name) ecoff_new_file (name)
      65  
      66  /* At the moment we don't want to do any stabs processing in read.c.  */
      67  #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
      68    ecoff_stab ((seg), (what), (string), (type), (other), (desc))
      69  
      70  #define EMIT_SECTION_SYMBOLS		0
      71  #define obj_sec_sym_ok_for_reloc(SEC)	1
      72  
      73  #define obj_ecoff_set_ext ecoff_set_ext
      74  
      75  extern void ecoff_frob_file_before_fix (void);
      76  extern void ecoff_frob_file (void);
      77  extern void obj_ecoff_set_ext (symbolS *, EXTR *);