Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
obj-coff.h File Reference
#include "targ-cpu.h"
#include "coff/internal.h"
#include "bfd/libcoff.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define OBJ_COFF   1
#define internal_lineno   bfd_internal_lineno
#define OBJ_COFF_MAX_AUXENTRIES   1
#define obj_symbol_new_hook   coff_obj_symbol_new_hook
#define obj_symbol_clone_hook   coff_obj_symbol_clone_hook
#define obj_read_begin_hook   coff_obj_read_begin_hook
#define OUTPUT_FLAVOR   bfd_target_coff_flavour
#define OBJ_SYMFIELD_TYPE   unsigned long
#define sy_obj   sy_flags
#define obj_sec_sym_ok_for_reloc(SEC)   ((SEC)->owner != 0)
#define SYM_AUXENT(S)   (&coffsymbol (symbol_get_bfdsym (S))->native[1].u.auxent)
#define SYM_AUXINFO(S)   (&coffsymbol (symbol_get_bfdsym (S))->native[1])
#define S_GET_NUMBER_AUXILIARY(s)   (coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)
#define S_SET_NUMBER_AUXILIARY(s, v)   (S_GET_NUMBER_AUXILIARY (s) = (v))
#define S_IS_STRING(s)   (strlen (S_GET_NAME (s)) > 8 ? 1 : 0)
#define SA_GET_SYM_TAGNDX(s)   (SYM_AUXENT (s)->x_sym.x_tagndx.l)
#define SA_GET_SYM_LNNO(s)   (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno)
#define SA_GET_SYM_SIZE(s)   (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size)
#define SA_GET_SYM_FSIZE(s)   (SYM_AUXENT (s)->x_sym.x_misc.x_fsize)
#define SA_GET_SYM_LNNOPTR(s)   (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr)
#define SA_GET_SYM_ENDNDX(s)   (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_endndx)
#define SA_GET_SYM_DIMEN(s, i)   (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)])
#define SA_GET_FILE_FNAME(s)   (SYM_AUXENT (s)->x_file.x_fname)
#define SA_GET_SCN_SCNLEN(s)   (SYM_AUXENT (s)->x_scn.x_scnlen)
#define SA_GET_SCN_NRELOC(s)   (SYM_AUXENT (s)->x_scn.x_nreloc)
#define SA_GET_SCN_NLINNO(s)   (SYM_AUXENT (s)->x_scn.x_nlinno)
#define SA_SET_SYM_LNNO(s, v)   (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno = (v))
#define SA_SET_SYM_SIZE(s, v)   (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size = (v))
#define SA_SET_SYM_FSIZE(s, v)   (SYM_AUXENT (s)->x_sym.x_misc.x_fsize = (v))
#define SA_SET_SYM_LNNOPTR(s, v)   (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr = (v))
#define SA_SET_SYM_DIMEN(s, i, v)   (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)] = (v))
#define SA_SET_FILE_FNAME(s, v)   strncpy (SYM_AUXENT (s)->x_file.x_fname, (v), FILNMLEN)
#define SA_SET_SCN_SCNLEN(s, v)   (SYM_AUXENT (s)->x_scn.x_scnlen = (v))
#define SA_SET_SCN_NRELOC(s, v)   (SYM_AUXENT (s)->x_scn.x_nreloc = (v))
#define SA_SET_SCN_NLINNO(s, v)   (SYM_AUXENT (s)->x_scn.x_nlinno = (v))
#define SF_I960_MASK   0x000001ff /* Bits 0-8 are used by the i960 port. */
#define SF_SYSPROC   0x0000003f /* bits 0-5 are used to store the sysproc number. */
#define SF_IS_SYSPROC   0x00000040 /* bit 6 marks symbols that are sysprocs. */
#define SF_BALNAME   0x00000080 /* bit 7 marks BALNAME symbols. */
#define SF_CALLNAME   0x00000100 /* bit 8 marks CALLNAME symbols. */
#define SF_NORMAL_MASK   0x0000ffff /* bits 12-15 are general purpose. */
#define SF_STATICS   0x00001000 /* Mark the .text & all symbols. */
#define SF_DEFINED   0x00002000 /* Symbol is defined in this file. */
#define SF_STRING   0x00004000 /* Symbol name length > 8. */
#define SF_LOCAL   0x00008000 /* Symbol must not be emitted. */
#define SF_DEBUG_MASK   0xffff0000 /* bits 16-31 are debug info. */
#define SF_FUNCTION   0x00010000 /* The symbol is a function. */
#define SF_PROCESS   0x00020000 /* Process symbol before write. */
#define SF_TAGGED   0x00040000 /* Is associated with a tag. */
#define SF_TAG   0x00080000 /* Is a tag. */
#define SF_DEBUG   0x00100000 /* Is in debug or abs section. */
#define SF_GET_SEGMENT   0x00200000 /* Get the section of the forward symbol. */
#define SF_GET(s)   (* symbol_get_obj (s))
#define SF_GET_DEBUG(s)   (symbol_get_bfdsym (s)->flags & BSF_DEBUGGING)
#define SF_SET_DEBUG(s)   (symbol_get_bfdsym (s)->flags |= BSF_DEBUGGING)
#define SF_GET_NORMAL_FIELD(s)   (SF_GET (s) & SF_NORMAL_MASK)
#define SF_GET_DEBUG_FIELD(s)   (SF_GET (s) & SF_DEBUG_MASK)
#define SF_GET_FILE(s)   (SF_GET (s) & SF_FILE)
#define SF_GET_STATICS(s)   (SF_GET (s) & SF_STATICS)
#define SF_GET_DEFINED(s)   (SF_GET (s) & SF_DEFINED)
#define SF_GET_STRING(s)   (SF_GET (s) & SF_STRING)
#define SF_GET_LOCAL(s)   (SF_GET (s) & SF_LOCAL)
#define SF_GET_FUNCTION(s)   (SF_GET (s) & SF_FUNCTION)
#define SF_GET_PROCESS(s)   (SF_GET (s) & SF_PROCESS)
#define SF_GET_TAGGED(s)   (SF_GET (s) & SF_TAGGED)
#define SF_GET_TAG(s)   (SF_GET (s) & SF_TAG)
#define SF_GET_GET_SEGMENT(s)   (SF_GET (s) & SF_GET_SEGMENT)
#define SF_GET_I960(s)   (SF_GET (s) & SF_I960_MASK) /* Used by i960. */
#define SF_GET_BALNAME(s)   (SF_GET (s) & SF_BALNAME) /* Used by i960. */
#define SF_GET_CALLNAME(s)   (SF_GET (s) & SF_CALLNAME) /* Used by i960. */
#define SF_GET_IS_SYSPROC(s)   (SF_GET (s) & SF_IS_SYSPROC) /* Used by i960. */
#define SF_GET_SYSPROC(s)   (SF_GET (s) & SF_SYSPROC) /* Used by i960. */
#define SF_SET(s, v)   (SF_GET (s) = (v))
#define SF_SET_NORMAL_FIELD(s, v)   (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s, v)   (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
#define SF_SET_FILE(s)   (SF_GET (s) |= SF_FILE)
#define SF_SET_STATICS(s)   (SF_GET (s) |= SF_STATICS)
#define SF_SET_DEFINED(s)   (SF_GET (s) |= SF_DEFINED)
#define SF_SET_STRING(s)   (SF_GET (s) |= SF_STRING)
#define SF_SET_LOCAL(s)   (SF_GET (s) |= SF_LOCAL)
#define SF_CLEAR_LOCAL(s)   (SF_GET (s) &= ~SF_LOCAL)
#define SF_SET_FUNCTION(s)   (SF_GET (s) |= SF_FUNCTION)
#define SF_SET_PROCESS(s)   (SF_GET (s) |= SF_PROCESS)
#define SF_SET_TAGGED(s)   (SF_GET (s) |= SF_TAGGED)
#define SF_SET_TAG(s)   (SF_GET (s) |= SF_TAG)
#define SF_SET_GET_SEGMENT(s)   (SF_GET (s) |= SF_GET_SEGMENT)
#define SF_SET_I960(s, v)   (SF_GET (s) |= ((v) & SF_I960_MASK)) /* Used by i960. */
#define SF_SET_BALNAME(s)   (SF_GET (s) |= SF_BALNAME) /* Used by i960. */
#define SF_SET_CALLNAME(s)   (SF_GET (s) |= SF_CALLNAME) /* Used by i960. */
#define SF_SET_IS_SYSPROC(s)   (SF_GET (s) |= SF_IS_SYSPROC) /* Used by i960. */
#define SF_SET_SYSPROC(s, v)   (SF_GET (s) |= ((v) & SF_SYSPROC)) /* Used by i960. */
#define obj_emit_lineno(WHERE, LINE, FILE_START)   abort ()
#define obj_app_file(name, app)   c_dot_file_symbol (name, app)
#define obj_frob_symbol(S, P)   coff_frob_symbol (S, & P)
#define obj_frob_section(S)   coff_frob_section (S)
#define obj_frob_file_after_relocs()   coff_frob_file_after_relocs ()
#define obj_adjust_symtab()   coff_adjust_symtab ()
#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest, src)
#define obj_pop_insert()   pop_insert (coff_pseudo_table)
#define RESOLVE_SYMBOL_REDEFINITION(sym)
#define SEPARATE_STAB_SECTIONS   1
#define INIT_STAB_SECTION(seg)   obj_coff_init_stab_section (seg)
#define SET_SECTION_RELOCS(sec, relocs, n)   SA_SET_SCN_NRELOC (section_symbol (sec), n)
#define obj_app_file(name, app)   c_dot_file_symbol (name, app)

Functions

int S_SET_DATA_TYPE (symbolS *, int)
int S_SET_STORAGE_CLASS (symbolS *, int)
int S_GET_STORAGE_CLASS (symbolS *)
void SA_SET_SYM_ENDNDX (symbolS *, symbolS *)
void coff_add_linesym (symbolS *)
void c_dot_file_symbol (const char *, int)
void coff_frob_symbol (symbolS *, int *)
void coff_adjust_symtab (void)
void coff_frob_section (segT)
void coff_adjust_section_syms (bfd *, asection *, void *)
void coff_frob_file_after_relocs (void)
void coff_obj_symbol_new_hook (symbolS *)
void coff_obj_symbol_clone_hook (symbolS *, symbolS *)
void coff_obj_read_begin_hook (void)
void obj_coff_section (int)
segT obj_coff_add_segment (const char *)
segT s_get_segment (symbolS *)
void tc_coff_symbol_emit_hook (symbolS *)
void obj_coff_pe_handle_link_once (void)
void obj_coff_init_stab_section (segT)
void c_section_header (struct internal_scnhdr *, char *, long, long, long, long, long, long, long, long)

Variables

int text_lineno_number
int coff_line_base
int coff_n_line_nos
symbolS * coff_last_function
const pseudo_typeS coff_pseudo_table []

Define Documentation

Definition at line 387 of file obj-coff.h.

#define internal_lineno   bfd_internal_lineno

Definition at line 32 of file obj-coff.h.

#define obj_adjust_symtab ( )    coff_adjust_symtab ()

Definition at line 337 of file obj-coff.h.

#define obj_app_file (   name,
  app 
)    c_dot_file_symbol (name, app)

Definition at line 393 of file obj-coff.h.

#define obj_app_file (   name,
  app 
)    c_dot_file_symbol (name, app)

Definition at line 393 of file obj-coff.h.

#define OBJ_COFF   1

Definition at line 26 of file obj-coff.h.

#define OBJ_COFF_MAX_AUXENTRIES   1

Definition at line 183 of file obj-coff.h.

#define OBJ_COPY_SYMBOL_ATTRIBUTES (   dest,
  src 
)
Value:
(SF_GET_GET_SEGMENT (dest) \
   ? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
   : 0)

Definition at line 344 of file obj-coff.h.

#define obj_emit_lineno (   WHERE,
  LINE,
  FILE_START 
)    abort ()

Definition at line 331 of file obj-coff.h.

Definition at line 335 of file obj-coff.h.

#define obj_frob_section (   S)    coff_frob_section (S)

Definition at line 334 of file obj-coff.h.

#define obj_frob_symbol (   S,
  P 
)    coff_frob_symbol (S, & P)

Definition at line 333 of file obj-coff.h.

Definition at line 367 of file obj-coff.h.

Definition at line 188 of file obj-coff.h.

#define obj_sec_sym_ok_for_reloc (   SEC)    ((SEC)->owner != 0)

Definition at line 207 of file obj-coff.h.

Definition at line 187 of file obj-coff.h.

Definition at line 186 of file obj-coff.h.

Definition at line 201 of file obj-coff.h.

Definition at line 192 of file obj-coff.h.

Value:
(SF_GET_GET_SEGMENT (sym)                        \
 ? (sym->sy_frag = frag_now,                            \
    S_SET_VALUE (sym, frag_now_fix ()),                 \
    S_SET_SEGMENT (sym, now_seg),                \
    0)                                           \
 : 0)

Definition at line 374 of file obj-coff.h.

#define S_GET_NUMBER_AUXILIARY (   s)    (coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)

Definition at line 216 of file obj-coff.h.

#define S_IS_STRING (   s)    (strlen (S_GET_NAME (s)) > 8 ? 1 : 0)

Definition at line 222 of file obj-coff.h.

#define S_SET_NUMBER_AUXILIARY (   s,
  v 
)    (S_GET_NUMBER_AUXILIARY (s) = (v))

Definition at line 219 of file obj-coff.h.

#define SA_GET_FILE_FNAME (   s)    (SYM_AUXENT (s)->x_file.x_fname)

Definition at line 235 of file obj-coff.h.

#define SA_GET_SCN_NLINNO (   s)    (SYM_AUXENT (s)->x_scn.x_nlinno)

Definition at line 238 of file obj-coff.h.

#define SA_GET_SCN_NRELOC (   s)    (SYM_AUXENT (s)->x_scn.x_nreloc)

Definition at line 237 of file obj-coff.h.

#define SA_GET_SCN_SCNLEN (   s)    (SYM_AUXENT (s)->x_scn.x_scnlen)

Definition at line 236 of file obj-coff.h.

#define SA_GET_SYM_DIMEN (   s,
  i 
)    (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)])

Definition at line 234 of file obj-coff.h.

#define SA_GET_SYM_ENDNDX (   s)    (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_endndx)

Definition at line 233 of file obj-coff.h.

#define SA_GET_SYM_FSIZE (   s)    (SYM_AUXENT (s)->x_sym.x_misc.x_fsize)

Definition at line 231 of file obj-coff.h.

#define SA_GET_SYM_LNNO (   s)    (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno)

Definition at line 229 of file obj-coff.h.

#define SA_GET_SYM_LNNOPTR (   s)    (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr)

Definition at line 232 of file obj-coff.h.

#define SA_GET_SYM_SIZE (   s)    (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size)

Definition at line 230 of file obj-coff.h.

#define SA_GET_SYM_TAGNDX (   s)    (SYM_AUXENT (s)->x_sym.x_tagndx.l)

Definition at line 228 of file obj-coff.h.

#define SA_SET_FILE_FNAME (   s,
  v 
)    strncpy (SYM_AUXENT (s)->x_file.x_fname, (v), FILNMLEN)

Definition at line 245 of file obj-coff.h.

#define SA_SET_SCN_NLINNO (   s,
  v 
)    (SYM_AUXENT (s)->x_scn.x_nlinno = (v))

Definition at line 248 of file obj-coff.h.

#define SA_SET_SCN_NRELOC (   s,
  v 
)    (SYM_AUXENT (s)->x_scn.x_nreloc = (v))

Definition at line 247 of file obj-coff.h.

#define SA_SET_SCN_SCNLEN (   s,
  v 
)    (SYM_AUXENT (s)->x_scn.x_scnlen = (v))

Definition at line 246 of file obj-coff.h.

#define SA_SET_SYM_DIMEN (   s,
  i,
  v 
)    (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)] = (v))

Definition at line 244 of file obj-coff.h.

#define SA_SET_SYM_FSIZE (   s,
  v 
)    (SYM_AUXENT (s)->x_sym.x_misc.x_fsize = (v))

Definition at line 242 of file obj-coff.h.

#define SA_SET_SYM_LNNO (   s,
  v 
)    (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno = (v))

Definition at line 240 of file obj-coff.h.

#define SA_SET_SYM_LNNOPTR (   s,
  v 
)    (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr = (v))

Definition at line 243 of file obj-coff.h.

#define SA_SET_SYM_SIZE (   s,
  v 
)    (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size = (v))

Definition at line 241 of file obj-coff.h.

#define SEPARATE_STAB_SECTIONS   1

Definition at line 383 of file obj-coff.h.

#define SET_SECTION_RELOCS (   sec,
  relocs,
  n 
)    SA_SET_SCN_NRELOC (section_symbol (sec), n)

Definition at line 390 of file obj-coff.h.

#define SF_BALNAME   0x00000080 /* bit 7 marks BALNAME symbols. */

Definition at line 261 of file obj-coff.h.

#define SF_CALLNAME   0x00000100 /* bit 8 marks CALLNAME symbols. */

Definition at line 262 of file obj-coff.h.

#define SF_CLEAR_LOCAL (   s)    (SF_GET (s) &= ~SF_LOCAL)

Definition at line 312 of file obj-coff.h.

#define SF_DEBUG   0x00100000 /* Is in debug or abs section. */

Definition at line 277 of file obj-coff.h.

#define SF_DEBUG_MASK   0xffff0000 /* bits 16-31 are debug info. */

Definition at line 271 of file obj-coff.h.

#define SF_DEFINED   0x00002000 /* Symbol is defined in this file. */

Definition at line 267 of file obj-coff.h.

#define SF_FUNCTION   0x00010000 /* The symbol is a function. */

Definition at line 273 of file obj-coff.h.

#define SF_GET (   s)    (* symbol_get_obj (s))

Definition at line 282 of file obj-coff.h.

#define SF_GET_BALNAME (   s)    (SF_GET (s) & SF_BALNAME) /* Used by i960. */

Definition at line 298 of file obj-coff.h.

#define SF_GET_CALLNAME (   s)    (SF_GET (s) & SF_CALLNAME) /* Used by i960. */

Definition at line 299 of file obj-coff.h.

#define SF_GET_DEBUG (   s)    (symbol_get_bfdsym (s)->flags & BSF_DEBUGGING)

Definition at line 283 of file obj-coff.h.

#define SF_GET_DEBUG_FIELD (   s)    (SF_GET (s) & SF_DEBUG_MASK)

Definition at line 286 of file obj-coff.h.

#define SF_GET_DEFINED (   s)    (SF_GET (s) & SF_DEFINED)

Definition at line 289 of file obj-coff.h.

#define SF_GET_FILE (   s)    (SF_GET (s) & SF_FILE)

Definition at line 287 of file obj-coff.h.

#define SF_GET_FUNCTION (   s)    (SF_GET (s) & SF_FUNCTION)

Definition at line 292 of file obj-coff.h.

#define SF_GET_GET_SEGMENT (   s)    (SF_GET (s) & SF_GET_SEGMENT)

Definition at line 296 of file obj-coff.h.

#define SF_GET_I960 (   s)    (SF_GET (s) & SF_I960_MASK) /* Used by i960. */

Definition at line 297 of file obj-coff.h.

#define SF_GET_IS_SYSPROC (   s)    (SF_GET (s) & SF_IS_SYSPROC) /* Used by i960. */

Definition at line 300 of file obj-coff.h.

#define SF_GET_LOCAL (   s)    (SF_GET (s) & SF_LOCAL)

Definition at line 291 of file obj-coff.h.

#define SF_GET_NORMAL_FIELD (   s)    (SF_GET (s) & SF_NORMAL_MASK)

Definition at line 285 of file obj-coff.h.

#define SF_GET_PROCESS (   s)    (SF_GET (s) & SF_PROCESS)

Definition at line 293 of file obj-coff.h.

#define SF_GET_SEGMENT   0x00200000 /* Get the section of the forward symbol. */

Definition at line 278 of file obj-coff.h.

#define SF_GET_STATICS (   s)    (SF_GET (s) & SF_STATICS)

Definition at line 288 of file obj-coff.h.

#define SF_GET_STRING (   s)    (SF_GET (s) & SF_STRING)

Definition at line 290 of file obj-coff.h.

#define SF_GET_SYSPROC (   s)    (SF_GET (s) & SF_SYSPROC) /* Used by i960. */

Definition at line 301 of file obj-coff.h.

#define SF_GET_TAG (   s)    (SF_GET (s) & SF_TAG)

Definition at line 295 of file obj-coff.h.

#define SF_GET_TAGGED (   s)    (SF_GET (s) & SF_TAGGED)

Definition at line 294 of file obj-coff.h.

#define SF_I960_MASK   0x000001ff /* Bits 0-8 are used by the i960 port. */

Definition at line 258 of file obj-coff.h.

#define SF_IS_SYSPROC   0x00000040 /* bit 6 marks symbols that are sysprocs. */

Definition at line 260 of file obj-coff.h.

#define SF_LOCAL   0x00008000 /* Symbol must not be emitted. */

Definition at line 269 of file obj-coff.h.

#define SF_NORMAL_MASK   0x0000ffff /* bits 12-15 are general purpose. */

Definition at line 264 of file obj-coff.h.

#define SF_PROCESS   0x00020000 /* Process symbol before write. */

Definition at line 274 of file obj-coff.h.

#define SF_SET (   s,
  v 
)    (SF_GET (s) = (v))

Definition at line 304 of file obj-coff.h.

#define SF_SET_BALNAME (   s)    (SF_GET (s) |= SF_BALNAME) /* Used by i960. */

Definition at line 319 of file obj-coff.h.

#define SF_SET_CALLNAME (   s)    (SF_GET (s) |= SF_CALLNAME) /* Used by i960. */

Definition at line 320 of file obj-coff.h.

#define SF_SET_DEBUG (   s)    (symbol_get_bfdsym (s)->flags |= BSF_DEBUGGING)

Definition at line 284 of file obj-coff.h.

#define SF_SET_DEBUG_FIELD (   s,
  v 
)    (SF_GET (s) |= ((v) & SF_DEBUG_MASK))

Definition at line 306 of file obj-coff.h.

#define SF_SET_DEFINED (   s)    (SF_GET (s) |= SF_DEFINED)

Definition at line 309 of file obj-coff.h.

#define SF_SET_FILE (   s)    (SF_GET (s) |= SF_FILE)

Definition at line 307 of file obj-coff.h.

#define SF_SET_FUNCTION (   s)    (SF_GET (s) |= SF_FUNCTION)

Definition at line 313 of file obj-coff.h.

#define SF_SET_GET_SEGMENT (   s)    (SF_GET (s) |= SF_GET_SEGMENT)

Definition at line 317 of file obj-coff.h.

#define SF_SET_I960 (   s,
  v 
)    (SF_GET (s) |= ((v) & SF_I960_MASK)) /* Used by i960. */

Definition at line 318 of file obj-coff.h.

#define SF_SET_IS_SYSPROC (   s)    (SF_GET (s) |= SF_IS_SYSPROC) /* Used by i960. */

Definition at line 321 of file obj-coff.h.

#define SF_SET_LOCAL (   s)    (SF_GET (s) |= SF_LOCAL)

Definition at line 311 of file obj-coff.h.

#define SF_SET_NORMAL_FIELD (   s,
  v 
)    (SF_GET (s) |= ((v) & SF_NORMAL_MASK))

Definition at line 305 of file obj-coff.h.

#define SF_SET_PROCESS (   s)    (SF_GET (s) |= SF_PROCESS)

Definition at line 314 of file obj-coff.h.

#define SF_SET_STATICS (   s)    (SF_GET (s) |= SF_STATICS)

Definition at line 308 of file obj-coff.h.

#define SF_SET_STRING (   s)    (SF_GET (s) |= SF_STRING)

Definition at line 310 of file obj-coff.h.

#define SF_SET_SYSPROC (   s,
  v 
)    (SF_GET (s) |= ((v) & SF_SYSPROC)) /* Used by i960. */

Definition at line 322 of file obj-coff.h.

#define SF_SET_TAG (   s)    (SF_GET (s) |= SF_TAG)

Definition at line 316 of file obj-coff.h.

#define SF_SET_TAGGED (   s)    (SF_GET (s) |= SF_TAGGED)

Definition at line 315 of file obj-coff.h.

#define SF_STATICS   0x00001000 /* Mark the .text & all symbols. */

Definition at line 266 of file obj-coff.h.

#define SF_STRING   0x00004000 /* Symbol name length > 8. */

Definition at line 268 of file obj-coff.h.

#define SF_SYSPROC   0x0000003f /* bits 0-5 are used to store the sysproc number. */

Definition at line 259 of file obj-coff.h.

#define SF_TAG   0x00080000 /* Is a tag. */

Definition at line 276 of file obj-coff.h.

#define SF_TAGGED   0x00040000 /* Is associated with a tag. */

Definition at line 275 of file obj-coff.h.

#define sy_obj   sy_flags

Definition at line 202 of file obj-coff.h.

#define SYM_AUXENT (   S)    (&coffsymbol (symbol_get_bfdsym (S))->native[1].u.auxent)

Definition at line 210 of file obj-coff.h.

#define SYM_AUXINFO (   S)    (&coffsymbol (symbol_get_bfdsym (S))->native[1])

Definition at line 212 of file obj-coff.h.


Function Documentation

void c_dot_file_symbol ( const char *  ,
int   
)
void c_section_header ( struct internal_scnhdr ,
char *  ,
long  ,
long  ,
long  ,
long  ,
long  ,
long  ,
long  ,
long   
)
void coff_add_linesym ( symbolS *  )

Definition at line 379 of file obj-coff.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void coff_adjust_section_syms ( bfd ,
asection ,
void *   
)
void coff_adjust_symtab ( void  )

Definition at line 1641 of file obj-coff.c.

Here is the call graph for this function:

void coff_frob_file_after_relocs ( void  )

Definition at line 1461 of file obj-coff.c.

Here is the call graph for this function:

void coff_frob_section ( segT  )

Definition at line 1649 of file obj-coff.c.

{
  segT strsec;
  char *p;
  fragS *fragp;
  bfd_vma size, n_entries, mask;
  bfd_vma align_power = (bfd_vma)sec->alignment_power + OCTETS_PER_BYTE_POWER;

  /* The COFF back end in BFD requires that all section sizes be
     rounded up to multiples of the corresponding section alignments,
     supposedly because standard COFF has no other way of encoding alignment
     for sections.  If your COFF flavor has a different way of encoding
     section alignment, then skip this step, as TICOFF does.  */
  size = bfd_get_section_size (sec);
  mask = ((bfd_vma) 1 << align_power) - 1;
#if !defined(TICOFF)
  if (size & mask)
    {
      bfd_vma new_size;
      fragS *last;

      new_size = (size + mask) & ~mask;
      bfd_set_section_size (stdoutput, sec, new_size);

      /* If the size had to be rounded up, add some padding in
         the last non-empty frag.  */
      fragp = seg_info (sec)->frchainP->frch_root;
      last = seg_info (sec)->frchainP->frch_last;
      while (fragp->fr_next != last)
       fragp = fragp->fr_next;
      last->fr_address = size;
      fragp->fr_offset += new_size - size;
    }
#endif

  /* If the section size is non-zero, the section symbol needs an aux
     entry associated with it, indicating the size.  We don't know
     all the values yet; coff_frob_symbol will fill them in later.  */
#ifndef TICOFF
  if (size != 0
      || sec == text_section
      || sec == data_section
      || sec == bss_section)
#endif
    {
      symbolS *secsym = section_symbol (sec);

      S_SET_STORAGE_CLASS (secsym, C_STAT);
      S_SET_NUMBER_AUXILIARY (secsym, 1);
      SF_SET_STATICS (secsym);
      SA_SET_SCN_SCNLEN (secsym, size);
    }

  /* FIXME: These should be in a "stabs.h" file, or maybe as.h.  */
#ifndef STAB_SECTION_NAME
#define STAB_SECTION_NAME ".stab"
#endif
#ifndef STAB_STRING_SECTION_NAME
#define STAB_STRING_SECTION_NAME ".stabstr"
#endif
  if (! streq (STAB_STRING_SECTION_NAME, sec->name))
    return;

  strsec = sec;
  sec = subseg_get (STAB_SECTION_NAME, 0);
  /* size is already rounded up, since other section will be listed first */
  size = bfd_get_section_size (strsec);

  n_entries = bfd_get_section_size (sec) / 12 - 1;

  /* Find first non-empty frag.  It should be large enough.  */
  fragp = seg_info (sec)->frchainP->frch_root;
  while (fragp && fragp->fr_fix == 0)
    fragp = fragp->fr_next;
  assert (fragp != 0 && fragp->fr_fix >= 12);

  /* Store the values.  */
  p = fragp->fr_literal;
  bfd_h_put_16 (stdoutput, n_entries, (bfd_byte *) p + 6);
  bfd_h_put_32 (stdoutput, size, (bfd_byte *) p + 8);
}

Here is the call graph for this function:

void coff_frob_symbol ( symbolS *  ,
int  
)

Definition at line 1159 of file obj-coff.c.

{
  static symbolS *last_tagP;
  static stack *block_stack;
  static symbolS *set_end;
  symbolS *next_set_end = NULL;

  if (symp == &abs_symbol)
    {
      *punt = 1;
      return;
    }

  if (current_lineno_sym)
    coff_add_linesym (NULL);

  if (!block_stack)
    block_stack = stack_init (512, sizeof (symbolS*));

#ifdef TE_PE
  if (S_GET_STORAGE_CLASS (symp) == C_NT_WEAK
      && ! S_IS_WEAK (symp)
      && weak_is_altname (S_GET_NAME (symp)))
    {
      /* This is a weak alternate symbol.  All processing of
        PECOFFweak symbols is done here, through the alternate.  */
      symbolS *weakp = symbol_find_noref (weak_altname2name
                                     (S_GET_NAME (symp)), 1);

      assert (weakp);
      assert (S_GET_NUMBER_AUXILIARY (weakp) == 1);

      if (! S_IS_WEAK (weakp))
       {
         /* The symbol was turned from weak to strong.  Discard altname.  */
         *punt = 1;
         return;
       }
      else if (symbol_equated_p (weakp))
       {
         /* The weak symbol has an alternate specified; symp is unneeded.  */
         S_SET_STORAGE_CLASS (weakp, C_NT_WEAK);
         SA_SET_SYM_TAGNDX (weakp,
           symbol_get_value_expression (weakp)->X_add_symbol);

         S_CLEAR_EXTERNAL (symp);
         *punt = 1;
         return;
       }
      else
       {
         /* The weak symbol has been assigned an alternate value.
             Copy this value to symp, and set symp as weakp's alternate.  */
         if (S_GET_STORAGE_CLASS (weakp) != C_NT_WEAK)
           {
             S_SET_STORAGE_CLASS (symp, S_GET_STORAGE_CLASS (weakp));
             S_SET_STORAGE_CLASS (weakp, C_NT_WEAK);
           }

         if (S_IS_DEFINED (weakp))
           {
             /* This is a defined weak symbol.  Copy value information
                from the weak symbol itself to the alternate symbol.  */
             symbol_set_value_expression (symp,
                                      symbol_get_value_expression (weakp));
             symbol_set_frag (symp, symbol_get_frag (weakp));
             S_SET_SEGMENT (symp, S_GET_SEGMENT (weakp));
           }
         else
           {
             /* This is an undefined weak symbol.
               Define the alternate symbol to zero.  */
             S_SET_VALUE (symp, 0);
             S_SET_SEGMENT (symp, absolute_section);
           }

         S_SET_NAME (symp, weak_uniquify (S_GET_NAME (symp)));
         S_SET_STORAGE_CLASS (symp, C_EXT);

         S_SET_VALUE (weakp, 0);
         S_SET_SEGMENT (weakp, undefined_section);
       }
    }
#else /* TE_PE */
  if (S_IS_WEAK (symp))
    S_SET_STORAGE_CLASS (symp, C_WEAKEXT);
#endif /* TE_PE */

  if (!S_IS_DEFINED (symp)
      && !S_IS_WEAK (symp)
      && S_GET_STORAGE_CLASS (symp) != C_STAT)
    S_SET_STORAGE_CLASS (symp, C_EXT);

  if (!SF_GET_DEBUG (symp))
    {
      symbolS * real;

      if (!SF_GET_LOCAL (symp)
         && !SF_GET_STATICS (symp)
         && S_GET_STORAGE_CLASS (symp) != C_LABEL
         && symbol_constant_p (symp)
         && (real = symbol_find_noref (S_GET_NAME (symp), 1))
         && S_GET_STORAGE_CLASS (real) == C_NULL
         && real != symp)
       {
         c_symbol_merge (symp, real);
         *punt = 1;
         return;
       }

      if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
       {
         assert (S_GET_VALUE (symp) == 0);
         if (S_IS_WEAKREFD (symp))
           *punt = 1;
         else
           S_SET_EXTERNAL (symp);
       }
      else if (S_GET_STORAGE_CLASS (symp) == C_NULL)
       {
         if (S_GET_SEGMENT (symp) == text_section
             && symp != seg_info (text_section)->sym)
           S_SET_STORAGE_CLASS (symp, C_LABEL);
         else
           S_SET_STORAGE_CLASS (symp, C_STAT);
       }

      if (SF_GET_PROCESS (symp))
       {
         if (S_GET_STORAGE_CLASS (symp) == C_BLOCK)
           {
             if (streq (S_GET_NAME (symp), ".bb"))
              stack_push (block_stack, (char *) &symp);
             else
              {
                symbolS *begin;

                begin = *(symbolS **) stack_pop (block_stack);
                if (begin == 0)
                  as_warn (_("mismatched .eb"));
                else
                  next_set_end = begin;
              }
           }

         if (coff_last_function == 0 && SF_GET_FUNCTION (symp))
           {
             union internal_auxent *auxp;

             coff_last_function = symp;
             if (S_GET_NUMBER_AUXILIARY (symp) < 1)
              S_SET_NUMBER_AUXILIARY (symp, 1);
             auxp = SYM_AUXENT (symp);
             memset (auxp->x_sym.x_fcnary.x_ary.x_dimen, 0,
                    sizeof (auxp->x_sym.x_fcnary.x_ary.x_dimen));
           }

         if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
           {
             if (coff_last_function == 0)
              as_fatal (_("C_EFCN symbol for %s out of scope"),
                       S_GET_NAME (symp));
             SA_SET_SYM_FSIZE (coff_last_function,
                            (long) (S_GET_VALUE (symp)
                                   - S_GET_VALUE (coff_last_function)));
             next_set_end = coff_last_function;
             coff_last_function = 0;
           }
       }

      if (S_IS_EXTERNAL (symp))
       S_SET_STORAGE_CLASS (symp, C_EXT);
      else if (SF_GET_LOCAL (symp))
       *punt = 1;

      if (SF_GET_FUNCTION (symp))
       symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION;
    }

  /* Double check weak symbols.  */
  if (S_IS_WEAK (symp) && S_IS_COMMON (symp))
    as_bad (_("Symbol `%s' can not be both weak and common"),
           S_GET_NAME (symp));

  if (SF_GET_TAG (symp))
    last_tagP = symp;
  else if (S_GET_STORAGE_CLASS (symp) == C_EOS)
    next_set_end = last_tagP;

#ifdef OBJ_XCOFF
  /* This is pretty horrible, but we have to set *punt correctly in
     order to call SA_SET_SYM_ENDNDX correctly.  */
  if (! symbol_used_in_reloc_p (symp)
      && ((symbol_get_bfdsym (symp)->flags & BSF_SECTION_SYM) != 0
         || (! (S_IS_EXTERNAL (symp) || S_IS_WEAK (symp))
             && ! symbol_get_tc (symp)->output
             && S_GET_STORAGE_CLASS (symp) != C_FILE)))
    *punt = 1;
#endif

  if (set_end != (symbolS *) NULL
      && ! *punt
      && ((symbol_get_bfdsym (symp)->flags & BSF_NOT_AT_END) != 0
         || (S_IS_DEFINED (symp)
             && ! S_IS_COMMON (symp)
             && (! S_IS_EXTERNAL (symp) || SF_GET_FUNCTION (symp)))))
    {
      SA_SET_SYM_ENDNDX (set_end, symp);
      set_end = NULL;
    }

  if (next_set_end != NULL)
    {
      if (set_end != NULL)
       as_warn ("Warning: internal error: forgetting to set endndx of %s",
               S_GET_NAME (set_end));
      set_end = next_set_end;
    }

#ifndef OBJ_XCOFF
  if (! *punt
      && S_GET_STORAGE_CLASS (symp) == C_FCN
      && streq (S_GET_NAME (symp), ".bf"))
    {
      if (coff_last_bf != NULL)
       SA_SET_SYM_ENDNDX (coff_last_bf, symp);
      coff_last_bf = symp;
    }
#endif
  if (coffsymbol (symbol_get_bfdsym (symp))->lineno)
    {
      int i;
      struct line_no *lptr;
      alent *l;

      lptr = (struct line_no *) coffsymbol (symbol_get_bfdsym (symp))->lineno;
      for (i = 0; lptr; lptr = lptr->next)
       i++;
      lptr = (struct line_no *) coffsymbol (symbol_get_bfdsym (symp))->lineno;

      /* We need i entries for line numbers, plus 1 for the first
        entry which BFD will override, plus 1 for the last zero
        entry (a marker for BFD).  */
      l = xmalloc ((i + 2) * sizeof (* l));
      coffsymbol (symbol_get_bfdsym (symp))->lineno = l;
      l[i + 1].line_number = 0;
      l[i + 1].u.sym = NULL;
      for (; i > 0; i--)
       {
         if (lptr->frag)
           lptr->l.u.offset += lptr->frag->fr_address / OCTETS_PER_BYTE;
         l[i] = lptr->l;
         lptr = lptr->next;
       }
    }
}

Here is the call graph for this function:

void coff_obj_read_begin_hook ( void  )

Definition at line 1145 of file obj-coff.c.

{
  /* These had better be the same.  Usually 18 bytes.  */
  know (sizeof (SYMENT) == sizeof (AUXENT));
  know (SYMESZ == AUXESZ);
  tag_init ();
}

Here is the call graph for this function:

void coff_obj_symbol_clone_hook ( symbolS *  ,
symbolS *   
)

Definition at line 333 of file obj-coff.c.

{
  long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
  combined_entry_type * s = xmalloc (sz);

  memcpy (s, coffsymbol (symbol_get_bfdsym (orgsymP))->native, sz);
  coffsymbol (symbol_get_bfdsym (newsymP))->native = s;

  SF_SET (newsymP, SF_GET (orgsymP));
}

Here is the call graph for this function:

void coff_obj_symbol_new_hook ( symbolS *  )

Definition at line 313 of file obj-coff.c.

{
  long   sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
  char * s  = xmalloc (sz);

  memset (s, 0, sz);
  coffsymbol (symbol_get_bfdsym (symbolP))->native = (combined_entry_type *) s;

  S_SET_DATA_TYPE (symbolP, T_NULL);
  S_SET_STORAGE_CLASS (symbolP, 0);
  S_SET_NUMBER_AUXILIARY (symbolP, 0);

  if (S_IS_STRING (symbolP))
    SF_SET_STRING (symbolP);

  if (S_IS_LOCAL (symbolP))
    SF_SET_LOCAL (symbolP);
}

Here is the call graph for this function:

Definition at line 1732 of file obj-coff.c.

{
  char *file;
  char *p;
  char *stabstr_name;
  unsigned int stroff;

  /* Make space for this first symbol.  */
  p = frag_more (12);
  /* Zero it out.  */
  memset (p, 0, 12);
  as_where (&file, (unsigned int *) NULL);
  stabstr_name = xmalloc (strlen (seg->name) + 4);
  strcpy (stabstr_name, seg->name);
  strcat (stabstr_name, "str");
  stroff = get_stab_string_offset (file, stabstr_name);
  know (stroff == 1);
  md_number_to_chars (p, stroff, 4);
}

Here is the call graph for this function:

void obj_coff_section ( int  )
segT s_get_segment ( symbolS *  )
int S_GET_STORAGE_CLASS ( symbolS *  )

Definition at line 228 of file obj-coff.c.

{
  return coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int S_SET_DATA_TYPE ( symbolS *  ,
int   
)

Definition at line 221 of file obj-coff.c.

{
  coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_type = val;
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int S_SET_STORAGE_CLASS ( symbolS *  ,
int   
)

Definition at line 234 of file obj-coff.c.

{
  coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass = val;
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SA_SET_SYM_ENDNDX ( symbolS *  ,
symbolS *   
)

Definition at line 193 of file obj-coff.c.

{
  combined_entry_type *entry, *p;

  entry = &coffsymbol (symbol_get_bfdsym (sym))->native[1];
  p = coffsymbol (symbol_get_bfdsym (val))->native;
  entry->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = p;
  entry->fix_end = 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void tc_coff_symbol_emit_hook ( symbolS *  )

Variable Documentation

Definition at line 1153 of file obj-coff.c.

Definition at line 302 of file obj-coff.c.

Definition at line 350 of file obj-coff.c.

const pseudo_typeS coff_pseudo_table[]

Definition at line 1775 of file obj-coff.c.