]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/liboasys.h
19990502 sourceware import
[thirdparty/binutils-gdb.git] / bfd / liboasys.h
1 /* BFD internal declarations for Oasys file format handling.
2 Copyright (C) 1990, 91, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
3 Scrawled by Steve Chamberlain of Cygnus Support.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21 typedef struct _oasys_symbol
22 {
23 asymbol symbol;
24 } oasys_symbol_type;
25
26 typedef struct _oasys_reloc {
27 arelent relent;
28 struct _oasys_reloc *next;
29 unsigned int symbol;
30 } oasys_reloc_type;
31
32
33 #define oasys_symbol(x) ((oasys_symbol_type *)(x))
34 #define oasys_per_section(x) ((oasys_per_section_type *)(x->used_by_bfd))
35
36 typedef struct _oasys_per_section
37 {
38 asection *section;
39 bfd_byte *data;
40 bfd_vma offset;
41 boolean had_vma;
42 oasys_reloc_type **reloc_tail_ptr;
43 bfd_vma pc;
44
45
46 file_ptr current_pos;
47 unsigned int current_byte;
48 boolean initialized;
49 } oasys_per_section_type;
50
51 #define NSECTIONS 10
52
53 typedef struct _oasys_ar_obstack {
54 file_ptr file_offset;
55 bfd *abfd;
56 } oasys_ar_obstack_type;
57
58
59 typedef struct _oasys_module_info {
60 file_ptr pos;
61 unsigned int size;
62 bfd *abfd;
63 char *name;
64 } oasys_module_info_type;
65
66 typedef struct _oasys_ar_data {
67 oasys_module_info_type *module;
68 unsigned int module_count;
69 unsigned int module_index;
70 } oasys_ar_data_type;
71
72 typedef struct _oasys_data {
73 char *strings;
74 asymbol *symbols;
75 unsigned int symbol_string_length;
76 asection *sections[OASYS_MAX_SEC_COUNT];
77 file_ptr first_data_record;
78 } oasys_data_type;
79
80 #define OASYS_DATA(abfd) ((abfd)->tdata.oasys_obj_data)
81 #define OASYS_AR_DATA(abfd) ((abfd)->tdata.oasys_ar_data)
82