mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
63 lines
2.1 KiB
C
63 lines
2.1 KiB
C
/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
|
|
|
|
This file is part of BFD, the Binary File Diddler.
|
|
|
|
BFD is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
any later version.
|
|
|
|
BFD is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with BFD; see the file COPYING. If not, write to
|
|
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
/* $Id$ */
|
|
|
|
/* BFD COFF object file private structure. */
|
|
|
|
/* Object file tdata; access macros */
|
|
|
|
#define obj_icof(bfd) ((struct icofdata *) ((bfd)->tdata))
|
|
#define exec_hdr(bfd) (obj_icof(bfd)->hdr)
|
|
#define obj_symbols(bfd) (obj_icof(bfd)->symbols)
|
|
#define obj_sym_filepos(bfd) (obj_icof(bfd)->sym_filepos)
|
|
|
|
#define obj_relocbase(bfd) (obj_icof(bfd)->relocbase)
|
|
#define obj_raw_syments(bfd) (obj_icof(bfd)->raw_syments)
|
|
#define obj_convert(bfd) (obj_icof(bfd)->conversion_table)
|
|
#define obj_symbol_slew(bfd) (obj_icof(bfd)->symbol_index_slew)
|
|
#define obj_string_table(bfd) (obj_icof(bfd)->string_table)
|
|
|
|
typedef struct {
|
|
asymbol symbol;
|
|
struct syment *native;
|
|
struct lineno_cache_entry *lineno;
|
|
} coff_symbol_type;
|
|
|
|
struct icofdata {
|
|
struct aouthdr *hdr; /* exec file header */
|
|
coff_symbol_type *symbols; /* symtab for input bfd */
|
|
unsigned int *conversion_table;
|
|
file_ptr sym_filepos;
|
|
|
|
long symbol_index_slew; /* used during read to mark whether a
|
|
C_FILE symbol as been added. */
|
|
|
|
struct syment *raw_syments;
|
|
struct lineno *raw_linenos;
|
|
unsigned int raw_syment_count;
|
|
char *string_table;
|
|
/* These are only valid once writing has begun */
|
|
long int relocbase;
|
|
|
|
};
|
|
|
|
/* We cast the address of the first element of a asymbol to ensure that the
|
|
* macro is only ever applied to an asymbol. */
|
|
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
|