OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [bfd/] [nlm-target.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
2
   Copyright 1993, 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3
 
4
This file is part of BFD, the Binary File Descriptor library.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19
 
20
#define nlm_core_file_p _bfd_dummy_target
21
 
22
#define nlm_get_symtab_upper_bound nlmNAME(get_symtab_upper_bound)
23
#define nlm_get_symtab nlmNAME(get_symtab)
24
#define nlm_make_empty_symbol nlmNAME(make_empty_symbol)
25
#define nlm_print_symbol nlmNAME(print_symbol)
26
#define nlm_get_symbol_info nlmNAME(get_symbol_info)
27
#define nlm_bfd_is_local_label_name bfd_generic_is_local_label_name
28
#define nlm_get_lineno _bfd_nosymbols_get_lineno
29
#define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
30
#define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
31
#define nlm_read_minisymbols _bfd_generic_read_minisymbols
32
#define nlm_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
33
 
34
#define nlm_get_reloc_upper_bound nlmNAME(get_reloc_upper_bound)
35
#define nlm_canonicalize_reloc nlmNAME(canonicalize_reloc)
36
#define nlm_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
37
 
38
#define nlm_set_section_contents nlmNAME(set_section_contents)
39
 
40
#define nlm_sizeof_headers _bfd_nolink_sizeof_headers
41
#define nlm_bfd_get_relocated_section_contents \
42
  bfd_generic_get_relocated_section_contents
43
#define nlm_bfd_relax_section bfd_generic_relax_section
44
#define nlm_bfd_gc_sections bfd_generic_gc_sections
45
#define nlm_bfd_merge_sections bfd_generic_merge_sections
46
#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
47
#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
48
#define nlm_bfd_final_link _bfd_generic_final_link
49
#define nlm_bfd_link_split_section _bfd_generic_link_split_section
50
 
51
/* This structure contains everything that BFD knows about a target.
52
   It includes things like its byte order, name, what routines to call
53
   to do various operations, etc.  Every BFD points to a target structure
54
   with its "xvec" member.
55
 
56
   There are two such structures here:  one for big-endian machines and
57
   one for little-endian machines.   */
58
 
59
/* Forward declaration for use when initialising alternative_target field.  */
60
#ifdef TARGET_LITTLE_SYM
61
extern const bfd_target TARGET_LITTLE_SYM;
62
#endif
63
 
64
#ifdef TARGET_BIG_SYM
65
const bfd_target TARGET_BIG_SYM =
66
{
67
  /* name: identify kind of target */
68
  TARGET_BIG_NAME,
69
 
70
  /* flavour: general indication about file */
71
  bfd_target_nlm_flavour,
72
 
73
  /* byteorder: data is big endian */
74
  BFD_ENDIAN_BIG,
75
 
76
  /* header_byteorder: header is also big endian */
77
  BFD_ENDIAN_BIG,
78
 
79
  /* object_flags: mask of all file flags */
80
  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
81
   | WP_TEXT),
82
 
83
  /* section_flags: mask of all section flags */
84
  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
85
   SEC_CODE | SEC_DATA),
86
 
87
   /* leading_symbol_char: is the first char of a user symbol
88
      predictable, and if so what is it */
89
   0,
90
 
91
  /* ar_pad_char: pad character for filenames within an archive header
92
     FIXME:  this really has nothing to do with NLM, this is a characteristic
93
     of the archiver and/or os and should be independently tunable */
94
  '/',
95
 
96
  /* ar_max_namelen: maximum number of characters in an archive header
97
     FIXME:  this really has nothing to do with NLM, this is a characteristic
98
     of the archiver and should be independently tunable.  This value is
99
     a WAG (wild a** guess) */
100
  15,
101
 
102
  /* Routines to byte-swap various sized integers from the data sections */
103
  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
104
    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
105
    bfd_getb16, bfd_getb_signed_16, bfd_putb16,
106
 
107
  /* Routines to byte-swap various sized integers from the file headers */
108
  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
109
    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
110
    bfd_getb16, bfd_getb_signed_16, bfd_putb16,
111
 
112
  /* bfd_check_format: check the format of a file being read */
113
  { _bfd_dummy_target,          /* unknown format */
114
    nlmNAME(object_p),          /* assembler/linker output (object file) */
115
    bfd_generic_archive_p,      /* an archive */
116
    nlm_core_file_p             /* a core file */
117
  },
118
 
119
  /* bfd_set_format: set the format of a file being written */
120
  { bfd_false,
121
    nlm_mkobject,
122
    _bfd_generic_mkarchive,
123
    bfd_false
124
  },
125
 
126
  /* bfd_write_contents: write cached information into a file being written */
127
  { bfd_false,
128
    nlmNAME(write_object_contents),
129
    _bfd_write_archive_contents,
130
    bfd_false
131
  },
132
 
133
  /* Initialize a jump table with the standard macro.  All names start with
134
     "nlm" */
135
  BFD_JUMP_TABLE_GENERIC (_bfd_generic),
136
  BFD_JUMP_TABLE_COPY (_bfd_generic),
137
  BFD_JUMP_TABLE_CORE (_bfd_nocore),
138
  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
139
  BFD_JUMP_TABLE_SYMBOLS (nlm),
140
  BFD_JUMP_TABLE_RELOCS (nlm),
141
  BFD_JUMP_TABLE_WRITE (nlm),
142
  BFD_JUMP_TABLE_LINK (nlm),
143
  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
144
 
145
  /* Alternative endian target.  */
146
#ifdef TARGET_LITTLE_SYM
147
  & TARGET_LITTLE_SYM,
148
#else
149
  NULL,
150
#endif
151
 
152
  /* backend_data: */
153
  (PTR) TARGET_BACKEND_DATA
154
};
155
#endif
156
 
157
#ifdef TARGET_LITTLE_SYM
158
const bfd_target TARGET_LITTLE_SYM =
159
{
160
  /* name: identify kind of target */
161
  TARGET_LITTLE_NAME,
162
 
163
  /* flavour: general indication about file */
164
  bfd_target_nlm_flavour,
165
 
166
  /* byteorder: data is little endian */
167
  BFD_ENDIAN_LITTLE,
168
 
169
  /* header_byteorder: header is also little endian */
170
  BFD_ENDIAN_LITTLE,
171
 
172
  /* object_flags: mask of all file flags */
173
  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
174
   | WP_TEXT),
175
 
176
  /* section_flags: mask of all section flags */
177
  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
178
   SEC_DATA),
179
 
180
   /* leading_symbol_char: is the first char of a user symbol
181
      predictable, and if so what is it */
182
   0,
183
 
184
  /* ar_pad_char: pad character for filenames within an archive header
185
     FIXME:  this really has nothing to do with NLM, this is a characteristic
186
     of the archiver and/or os and should be independently tunable */
187
  '/',
188
 
189
  /* ar_max_namelen: maximum number of characters in an archive header
190
     FIXME:  this really has nothing to do with NLM, this is a characteristic
191
     of the archiver and should be independently tunable.  This value is
192
     a WAG (wild a** guess) */
193
  15,
194
 
195
  /* Routines to byte-swap various sized integers from the data sections */
196
  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
197
    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
198
    bfd_getl16, bfd_getl_signed_16, bfd_putl16,
199
 
200
  /* Routines to byte-swap various sized integers from the file headers */
201
  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
202
    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
203
    bfd_getl16, bfd_getl_signed_16, bfd_putl16,
204
 
205
  /* bfd_check_format: check the format of a file being read */
206
  { _bfd_dummy_target,          /* unknown format */
207
    nlmNAME(object_p),          /* assembler/linker output (object file) */
208
    bfd_generic_archive_p,      /* an archive */
209
    nlm_core_file_p             /* a core file */
210
  },
211
 
212
  /* bfd_set_format: set the format of a file being written */
213
  { bfd_false,
214
    nlm_mkobject,
215
    _bfd_generic_mkarchive,
216
    bfd_false
217
  },
218
 
219
  /* bfd_write_contents: write cached information into a file being written */
220
  { bfd_false,
221
    nlmNAME(write_object_contents),
222
    _bfd_write_archive_contents,
223
    bfd_false
224
  },
225
 
226
  /* Initialize a jump table with the standard macro.  All names start with
227
     "nlm" */
228
  BFD_JUMP_TABLE_GENERIC (_bfd_generic),
229
  BFD_JUMP_TABLE_COPY (_bfd_generic),
230
  BFD_JUMP_TABLE_CORE (_bfd_nocore),
231
  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
232
  BFD_JUMP_TABLE_SYMBOLS (nlm),
233
  BFD_JUMP_TABLE_RELOCS (nlm),
234
  BFD_JUMP_TABLE_WRITE (nlm),
235
  BFD_JUMP_TABLE_LINK (nlm),
236
  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
237
 
238
  /* Alternative endian target.  */
239
#ifdef TARGET_BIG_SYM
240
  & TARGET_BIG_SYM,
241
#else
242
  NULL,
243
#endif
244
 
245
  /* backend_data: */
246
  (PTR) TARGET_BACKEND_DATA
247
};
248
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.