Back to index

cell-binutils  2.17cvs20070401
obj.h
Go to the documentation of this file.
00001 /* obj.h - defines the object dependent hooks for all object
00002    format backends.
00003 
00004    Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000,
00005    2002, 2003, 2004, 2005 Free Software Foundation, Inc.
00006 
00007    This file is part of GAS, the GNU Assembler.
00008 
00009    GAS is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2, or (at your option)
00012    any later version.
00013 
00014    GAS is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with GAS; see the file COPYING.  If not, write to the Free
00021    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00022    02110-1301, USA.  */
00023 
00024 char *obj_default_output_file_name (void);
00025 void obj_emit_relocations (char **where, fixS * fixP,
00026                         relax_addressT segment_address_in_file);
00027 void obj_emit_strings (char **where);
00028 void obj_emit_symbols (char **where, symbolS * symbols);
00029 #ifndef obj_read_begin_hook
00030 void obj_read_begin_hook (void);
00031 #endif
00032 
00033 #ifndef obj_symbol_new_hook
00034 void obj_symbol_new_hook (symbolS * symbolP);
00035 #endif
00036 
00037 void obj_symbol_to_chars (char **where, symbolS * symbolP);
00038 
00039 extern const pseudo_typeS obj_pseudo_table[];
00040 
00041 struct format_ops {
00042   int flavor;
00043   unsigned dfl_leading_underscore : 1;
00044   unsigned emit_section_symbols : 1;
00045   void (*begin) (void);
00046   void (*app_file) (const char *, int);
00047   void (*frob_symbol) (symbolS *, int *);
00048   void (*frob_file) (void);
00049   void (*frob_file_before_adjust) (void);
00050   void (*frob_file_before_fix) (void);
00051   void (*frob_file_after_relocs) (void);
00052   bfd_vma (*s_get_size) (symbolS *);
00053   void (*s_set_size) (symbolS *, bfd_vma);
00054   bfd_vma (*s_get_align) (symbolS *);
00055   void (*s_set_align) (symbolS *, bfd_vma);
00056   int (*s_get_other) (symbolS *);
00057   void (*s_set_other) (symbolS *, int);
00058   int (*s_get_desc) (symbolS *);
00059   void (*s_set_desc) (symbolS *, int);
00060   int (*s_get_type) (symbolS *);
00061   void (*s_set_type) (symbolS *, int);
00062   void (*copy_symbol_attributes) (symbolS *, symbolS *);
00063   void (*generate_asm_lineno) (void);
00064   void (*process_stab) (segT, int, const char *, int, int, int);
00065   int (*separate_stab_sections) (void);
00066   void (*init_stab_section) (segT);
00067   int (*sec_sym_ok_for_reloc) (asection *);
00068   void (*pop_insert) (void);
00069   /* For configurations using ECOFF_DEBUGGING, this callback is used.  */
00070   void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *);
00071 
00072   void (*read_begin_hook) (void);
00073   void (*symbol_new_hook) (symbolS *);
00074 };
00075 
00076 extern const struct format_ops elf_format_ops;
00077 extern const struct format_ops ecoff_format_ops;
00078 extern const struct format_ops coff_format_ops;
00079 extern const struct format_ops aout_format_ops;
00080 
00081 #ifndef this_format
00082 COMMON const struct format_ops *this_format;
00083 #endif
00084 
00085 /* end of obj.h */