133965Sjdp/* obj.h - defines the object dependent hooks for all object
233965Sjdp   format backends.
333965Sjdp
4218822Sdim   Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000,
5218822Sdim   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
633965Sjdp
733965Sjdp   This file is part of GAS, the GNU Assembler.
833965Sjdp
933965Sjdp   GAS is free software; you can redistribute it and/or modify
1033965Sjdp   it under the terms of the GNU General Public License as published by
1133965Sjdp   the Free Software Foundation; either version 2, or (at your option)
1233965Sjdp   any later version.
1333965Sjdp
1433965Sjdp   GAS is distributed in the hope that it will be useful,
1533965Sjdp   but WITHOUT ANY WARRANTY; without even the implied warranty of
1633965Sjdp   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1733965Sjdp   GNU General Public License for more details.
1833965Sjdp
1933965Sjdp   You should have received a copy of the GNU General Public License
2060484Sobrien   along with GAS; see the file COPYING.  If not, write to the Free
21218822Sdim   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22218822Sdim   02110-1301, USA.  */
2333965Sjdp
24130561Sobrienchar *obj_default_output_file_name (void);
25130561Sobrienvoid obj_emit_relocations (char **where, fixS * fixP,
26130561Sobrien			   relax_addressT segment_address_in_file);
27130561Sobrienvoid obj_emit_strings (char **where);
28130561Sobrienvoid obj_emit_symbols (char **where, symbolS * symbols);
2933965Sjdp#ifndef obj_read_begin_hook
30130561Sobrienvoid obj_read_begin_hook (void);
3133965Sjdp#endif
3233965Sjdp
3333965Sjdp#ifndef obj_symbol_new_hook
34130561Sobrienvoid obj_symbol_new_hook (symbolS * symbolP);
3533965Sjdp#endif
3633965Sjdp
37130561Sobrienvoid obj_symbol_to_chars (char **where, symbolS * symbolP);
3833965Sjdp
3933965Sjdpextern const pseudo_typeS obj_pseudo_table[];
4033965Sjdp
4133965Sjdpstruct format_ops {
4233965Sjdp  int flavor;
4333965Sjdp  unsigned dfl_leading_underscore : 1;
4433965Sjdp  unsigned emit_section_symbols : 1;
45130561Sobrien  void (*begin) (void);
46218822Sdim  void (*app_file) (const char *, int);
47130561Sobrien  void (*frob_symbol) (symbolS *, int *);
48130561Sobrien  void (*frob_file) (void);
49130561Sobrien  void (*frob_file_before_adjust) (void);
50130561Sobrien  void (*frob_file_before_fix) (void);
51130561Sobrien  void (*frob_file_after_relocs) (void);
52130561Sobrien  bfd_vma (*s_get_size) (symbolS *);
53130561Sobrien  void (*s_set_size) (symbolS *, bfd_vma);
54130561Sobrien  bfd_vma (*s_get_align) (symbolS *);
55130561Sobrien  void (*s_set_align) (symbolS *, bfd_vma);
56130561Sobrien  int (*s_get_other) (symbolS *);
57130561Sobrien  void (*s_set_other) (symbolS *, int);
58130561Sobrien  int (*s_get_desc) (symbolS *);
59130561Sobrien  void (*s_set_desc) (symbolS *, int);
60130561Sobrien  int (*s_get_type) (symbolS *);
61130561Sobrien  void (*s_set_type) (symbolS *, int);
62130561Sobrien  void (*copy_symbol_attributes) (symbolS *, symbolS *);
63130561Sobrien  void (*generate_asm_lineno) (void);
64130561Sobrien  void (*process_stab) (segT, int, const char *, int, int, int);
65130561Sobrien  int (*separate_stab_sections) (void);
66130561Sobrien  void (*init_stab_section) (segT);
67130561Sobrien  int (*sec_sym_ok_for_reloc) (asection *);
68130561Sobrien  void (*pop_insert) (void);
6933965Sjdp  /* For configurations using ECOFF_DEBUGGING, this callback is used.  */
70130561Sobrien  void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *);
7133965Sjdp
72130561Sobrien  void (*read_begin_hook) (void);
73130561Sobrien  void (*symbol_new_hook) (symbolS *);
7433965Sjdp};
7533965Sjdp
7633965Sjdpextern const struct format_ops elf_format_ops;
7733965Sjdpextern const struct format_ops ecoff_format_ops;
7833965Sjdpextern const struct format_ops coff_format_ops;
7960484Sobrienextern const struct format_ops aout_format_ops;
8033965Sjdp
8133965Sjdp#ifndef this_format
8233965SjdpCOMMON const struct format_ops *this_format;
8333965Sjdp#endif
8433965Sjdp
8533965Sjdp/* end of obj.h */
86