1 /* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
3 This file is part of BFD, the Binary File Diddler.
5 BFD is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 1, or (at your option)
10 BFD is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with BFD; see the file COPYING. If not, write to
17 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* BFD back-end data structures for a.out (and similar) files.
23 We try to encapsulate the differences in a few routines, and otherwise
24 share large masses of code. This means we only have to fix bugs in
25 one place, most of the time. */
29 #define exec_hdr(bfd) (((struct sunexdata *) ((bfd)->tdata))->hdr)
30 /*#define obj_symbols(bfd) ((((struct sunexdata *) ((bfd)->tdata))->symbols))*/
31 #define obj_textsec(bfd) (((struct sunexdata *) ((bfd)->tdata))->textsec)
32 #define obj_datasec(bfd) (((struct sunexdata *) ((bfd)->tdata))->datasec)
33 #define obj_bsssec(bfd) (((struct sunexdata *) ((bfd)->tdata))->bsssec)
34 #define obj_sym_filepos(bfd) (((struct sunexdata *) ((bfd)->tdata))->sym_filepos)
35 #define obj_str_filepos(bfd) (((struct sunexdata *) ((bfd)->tdata))->str_filepos)
48 struct exec
*hdr
; /* exec file header */
49 aout_symbol_type
*symbols
; /* symtab for input bfd */
52 /* For ease, we do this */
57 /* We remember these offsets so that after check_file_format, we have
58 no dependencies on the particular format of the exec_hdr. */
64 #define obj_outsymbols(bfd) ((PTR)(((struct sunexdata *) ((bfd)->tdata))->outsymbols))
68 /* We take the address of the first element of an asymbol to ensure that the
69 * macro is only ever applied to an asymbol */
70 #define aout_symbol(asymbol) ((aout_symbol_type *)(&(asymbol)->the_bfd))
72 /*#define obj_symbols(bfd) ((((struct sunexdata *) ((bfd)->tdata))->symbols))*/
73 #define obj_aout_symbols(bfd) ((((struct sunexdata *) (bfd)->tdata))->symbols)
74 #define obj_arch_flags(bfd) ((((struct sunexdata *) (bfd)->tdata))->arch_flags)
76 #define get_tdata(x) ((struct sunexdata *)((x)->tdata))
This page took 0.030006 seconds and 4 git commands to generate.