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