Back to index

cell-binutils  2.17cvs20070401
liboasys.h
Go to the documentation of this file.
00001 /* BFD internal declarations for Oasys file format handling.
00002    Copyright 1990, 1991, 1992, 1993, 1994, 1997, 2002
00003    Free Software Foundation, Inc.
00004    Scrawled by Steve Chamberlain of Cygnus Support.
00005 
00006 This file is part of BFD, the Binary File Descriptor library.
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 typedef struct _oasys_symbol
00023 {
00024   asymbol symbol;
00025 } oasys_symbol_type;
00026 
00027 typedef struct _oasys_reloc {
00028   arelent relent;
00029   struct _oasys_reloc *next;
00030   unsigned int symbol;
00031 } oasys_reloc_type;
00032 
00033 
00034 #define oasys_symbol(x) ((oasys_symbol_type *)(x))
00035 #define oasys_per_section(x) ((oasys_per_section_type *)(x->used_by_bfd))
00036 
00037 typedef struct _oasys_per_section
00038 {
00039   asection *section;
00040   bfd_byte *data;
00041   bfd_vma offset;
00042   bfd_boolean had_vma;
00043   oasys_reloc_type **reloc_tail_ptr;
00044   bfd_vma pc;
00045 
00046 
00047   file_ptr current_pos;
00048   unsigned int current_byte;
00049   bfd_boolean initialized;
00050 } oasys_per_section_type;
00051 
00052 #define NSECTIONS 10
00053 
00054 typedef struct _oasys_ar_obstack {
00055   file_ptr file_offset;
00056   bfd *abfd;
00057 } oasys_ar_obstack_type;
00058 
00059 
00060 typedef struct _oasys_module_info {
00061   file_ptr pos;
00062   unsigned int size;
00063   bfd *abfd;
00064   char *name;
00065 } oasys_module_info_type;
00066 
00067 typedef struct _oasys_ar_data {
00068   oasys_module_info_type *module;
00069   unsigned int module_count;
00070   unsigned int module_index;
00071 } oasys_ar_data_type;
00072 
00073 typedef struct _oasys_data {
00074   char *strings;
00075   asymbol *symbols;
00076   unsigned int symbol_string_length;
00077   asection *sections[OASYS_MAX_SEC_COUNT];
00078   file_ptr first_data_record;
00079 } oasys_data_type;
00080 
00081 #define OASYS_DATA(abfd)    ((abfd)->tdata.oasys_obj_data)
00082 #define OASYS_AR_DATA(abfd) ((abfd)->tdata.oasys_ar_data)
00083