1 /* HP PA-RISC SOM object file format: definitions internal to BFD.
2 Copyright (C) 1990-1991 Free Software Foundation, Inc.
4 Contributed by the Center for Software Science at the
5 University of Utah (pa-gdb-bugs@cs.utah.edu).
7 This file is part of BFD, the Binary File Descriptor library.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
23 #define BYTES_IN_WORD 4
26 struct som_exec_auxhdr;
27 struct subspace_dictionary;
31 #define FILE_HDR_SIZE sizeof(struct header)
32 #define AUX_HDR_SIZE sizeof(struct som_exec_auxhdr)
34 unsigned int millicode_start, millicode_end;
45 unsigned long n_value;
48 typedef struct hppa_symbol
58 struct header *file_hdr;
59 struct som_exec_auxhdr *aux_hdr;
60 hppa_symbol_type *symbols;
62 /* For ease, we do this */
67 /* We remember these offsets so that after check_file_format, we have
68 no dependencies on the particular format of the exec_hdr. */
69 file_ptr dbx_sym_filepos;
70 file_ptr dbx_str_filepos;
72 file_ptr hp_sym_filepos;
73 file_ptr hp_str_filepos;
78 unsigned dbx_stringtab_size;
79 unsigned hp_stringtab_size;
81 /* Size of a symbol table entry in external form */
82 unsigned dbx_symbol_entry_size;
83 unsigned hp_symbol_entry_size;
86 struct hppa_data_struct {
91 #define padata(bfd) ((bfd)->tdata.hppa_data->a)
92 #define obj_file_hdr(bfd) (padata(bfd).file_hdr)
93 #define obj_aux_hdr(bfd) (padata(bfd).aux_hdr)
94 #define obj_pa_symbols(bfd) (padata(bfd).symbols)
95 #define obj_textsec(bfd) (padata(bfd).textsec)
96 #define obj_datasec(bfd) (padata(bfd).datasec)
97 #define obj_bsssec(bfd) (padata(bfd).bsssec)
98 #define obj_dbx_sym_filepos(bfd) (padata(bfd).dbx_sym_filepos)
99 #define obj_dbx_str_filepos(bfd) (padata(bfd).dbx_str_filepos)
100 #define obj_hp_sym_filepos(bfd) (padata(bfd).hp_sym_filepos)
101 #define obj_hp_str_filepos(bfd) (padata(bfd).hp_str_filepos)
102 #define obj_dbx_sym_count(bfd) (padata(bfd).dbx_sym_count)
103 #define obj_hp_sym_count(bfd) (padata(bfd).hp_sym_count)
104 #define obj_dbx_stringtab_size(bfd) (padata(bfd).dbx_stringtab_size)
105 #define obj_hp_stringtab_size(bfd) (padata(bfd).hp_stringtab_size)
106 #define obj_dbx_symbol_entry_size(bfd) (padata(bfd).dbx_symbol_entry_size)
107 #define obj_hp_symbol_entry_size(bfd) (padata(bfd).hp_symbol_entry_size)
109 /* We take the address of the first element of an asymbol to ensure that the
110 macro is only ever applied to an asymbol */
111 #define hppa_symbol(asymbol) ((hppa_symbol_type *)(&(asymbol)->the_bfd))
114 /* These are stored in the bfd's tdata */
115 struct hppa_core_struct
117 struct hpuxuser *upage;
118 asection *data_section;
119 asection *stack_section;
120 asection *reg_section;
124 #define core_upage(bfd) ((bfd)->tdata.hppa_core_data->upage)
125 #define core_datasec(bfd) ((bfd)->tdata.hppa_core_data->data_section)
126 #define core_stacksec(bfd) ((bfd)->tdata.hppa_core_data->stack_section)
127 #define core_regsec(bfd) ((bfd)->tdata.hppa_core_data->reg_section)