daily update
[deliverable/binutils-gdb.git] / bfd / nlm-target.h
CommitLineData
252b5132 1/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
7920ce38
NC
2 Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005 Free Software Foundation, Inc.
252b5132 4
7920ce38 5 This file is part of BFD, the Binary File Descriptor library.
252b5132 6
7920ce38
NC
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.
252b5132 11
7920ce38
NC
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.
252b5132 16
7920ce38
NC
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
3e110533 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
252b5132
RH
20
21#define nlm_core_file_p _bfd_dummy_target
22
7920ce38
NC
23#define nlm_get_symtab_upper_bound nlmNAME (get_symtab_upper_bound)
24#define nlm_canonicalize_symtab nlmNAME (canonicalize_symtab)
25#define nlm_make_empty_symbol nlmNAME (make_empty_symbol)
26#define nlm_print_symbol nlmNAME (print_symbol)
27#define nlm_get_symbol_info nlmNAME (get_symbol_info)
28#define nlm_bfd_is_local_label_name bfd_generic_is_local_label_name
29#define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
30#define nlm_get_lineno _bfd_nosymbols_get_lineno
31#define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
4ab527b0 32#define nlm_find_inliner_info _bfd_nosymbols_find_inliner_info
7920ce38
NC
33#define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
34#define nlm_read_minisymbols _bfd_generic_read_minisymbols
35#define nlm_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
36
37#define nlm_get_reloc_upper_bound nlmNAME (get_reloc_upper_bound)
38#define nlm_canonicalize_reloc nlmNAME (canonicalize_reloc)
39#define nlm_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
40#define nlm_set_section_contents nlmNAME (set_section_contents)
41
42#define nlm_sizeof_headers _bfd_nolink_sizeof_headers
43#define nlm_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
44#define nlm_bfd_relax_section bfd_generic_relax_section
45#define nlm_bfd_gc_sections bfd_generic_gc_sections
46#define nlm_bfd_merge_sections bfd_generic_merge_sections
47#define nlm_bfd_is_group_section bfd_generic_is_group_section
48#define nlm_bfd_discard_group bfd_generic_discard_group
49#define nlm_section_already_linked _bfd_generic_section_already_linked
50#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
51#define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
52#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
53#define nlm_bfd_link_just_syms _bfd_generic_link_just_syms
54#define nlm_bfd_final_link _bfd_generic_final_link
55#define nlm_bfd_link_split_section _bfd_generic_link_split_section
252b5132
RH
56
57/* This structure contains everything that BFD knows about a target.
58 It includes things like its byte order, name, what routines to call
59 to do various operations, etc. Every BFD points to a target structure
60 with its "xvec" member.
61
62 There are two such structures here: one for big-endian machines and
63 one for little-endian machines. */
64
c3c89269
NC
65/* Forward declaration for use when initialising alternative_target field. */
66#ifdef TARGET_LITTLE_SYM
67extern const bfd_target TARGET_LITTLE_SYM;
68#endif
252b5132
RH
69
70#ifdef TARGET_BIG_SYM
71const bfd_target TARGET_BIG_SYM =
72{
7920ce38 73 /* Name: identify kind of target. */
252b5132
RH
74 TARGET_BIG_NAME,
75
7920ce38 76 /* Flavour: general indication about file. */
252b5132
RH
77 bfd_target_nlm_flavour,
78
7920ce38 79 /* Byteorder: data is big endian. */
252b5132
RH
80 BFD_ENDIAN_BIG,
81
7920ce38 82 /* Header_byteorder: header is also big endian. */
252b5132
RH
83 BFD_ENDIAN_BIG,
84
7920ce38 85 /* Object_flags: mask of all file flags. */
252b5132
RH
86 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
87 | WP_TEXT),
1518639e 88
7920ce38
NC
89 /* Section_flags: mask of all section flags. */
90 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
91 | SEC_CODE | SEC_DATA),
252b5132 92
7920ce38
NC
93 /* Leading_symbol_char: is the first char of a user symbol
94 predictable, and if so what is it. */
252b5132
RH
95 0,
96
7920ce38 97 /* AR_pad_char: pad character for filenames within an archive header
252b5132 98 FIXME: this really has nothing to do with NLM, this is a characteristic
7920ce38 99 of the archiver and/or os and should be independently tunable. */
252b5132
RH
100 '/',
101
7920ce38 102 /* AR_max_namelen: maximum number of characters in an archive header
252b5132
RH
103 FIXME: this really has nothing to do with NLM, this is a characteristic
104 of the archiver and should be independently tunable. This value is
7920ce38 105 a WAG (wild a** guess). */
252b5132
RH
106 15,
107
7920ce38 108 /* Routines to byte-swap various sized integers from the data sections. */
252b5132 109 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
7920ce38
NC
110 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
111 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
252b5132 112
7920ce38 113 /* Routines to byte-swap various sized integers from the file headers. */
252b5132 114 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
7920ce38
NC
115 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
116 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
117
118 /* bfd_check_format: check the format of a file being read. */
119 { _bfd_dummy_target, /* Unknown format. */
120 nlmNAME (object_p), /* Assembler/linker output (object file). */
121 bfd_generic_archive_p, /* An archive. */
122 nlm_core_file_p /* A core file. */
252b5132
RH
123 },
124
7920ce38 125 /* bfd_set_format: set the format of a file being written. */
252b5132
RH
126 { bfd_false,
127 nlm_mkobject,
128 _bfd_generic_mkarchive,
129 bfd_false
130 },
131
7920ce38 132 /* bfd_write_contents: write cached information into a file being written. */
252b5132 133 { bfd_false,
7920ce38 134 nlmNAME (write_object_contents),
252b5132
RH
135 _bfd_write_archive_contents,
136 bfd_false
137 },
138
7920ce38
NC
139 /* Initialize a jump table with the standard macro.
140 All names start with "nlm". */
252b5132
RH
141 BFD_JUMP_TABLE_GENERIC (_bfd_generic),
142 BFD_JUMP_TABLE_COPY (_bfd_generic),
143 BFD_JUMP_TABLE_CORE (_bfd_nocore),
144 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
145 BFD_JUMP_TABLE_SYMBOLS (nlm),
146 BFD_JUMP_TABLE_RELOCS (nlm),
147 BFD_JUMP_TABLE_WRITE (nlm),
148 BFD_JUMP_TABLE_LINK (nlm),
149 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
150
c3c89269
NC
151 /* Alternative endian target. */
152#ifdef TARGET_LITTLE_SYM
153 & TARGET_LITTLE_SYM,
154#else
155 NULL,
156#endif
1518639e 157
7920ce38
NC
158 /* Backend_data. */
159 (void *) TARGET_BACKEND_DATA
252b5132
RH
160};
161#endif
162
163#ifdef TARGET_LITTLE_SYM
164const bfd_target TARGET_LITTLE_SYM =
165{
7920ce38 166 /* Name: identify kind of target. */
252b5132
RH
167 TARGET_LITTLE_NAME,
168
7920ce38 169 /* Flavour: general indication about file. */
252b5132
RH
170 bfd_target_nlm_flavour,
171
7920ce38 172 /* Byteorder: data is little endian. */
252b5132
RH
173 BFD_ENDIAN_LITTLE,
174
7920ce38 175 /* Header_byteorder: header is also little endian. */
252b5132
RH
176 BFD_ENDIAN_LITTLE,
177
7920ce38 178 /* Object_flags: mask of all file flags. */
252b5132
RH
179 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
180 | WP_TEXT),
1518639e 181
7920ce38
NC
182 /* Section_flags: mask of all section flags. */
183 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
184 | SEC_DATA),
252b5132 185
7920ce38
NC
186 /* Leading_symbol_char: is the first char of a user symbol
187 predictable, and if so what is it. */
252b5132
RH
188 0,
189
7920ce38 190 /* AR_pad_char: pad character for filenames within an archive header
252b5132 191 FIXME: this really has nothing to do with NLM, this is a characteristic
7920ce38 192 of the archiver and/or os and should be independently tunable. */
252b5132
RH
193 '/',
194
7920ce38 195 /* AR_max_namelen: maximum number of characters in an archive header
252b5132
RH
196 FIXME: this really has nothing to do with NLM, this is a characteristic
197 of the archiver and should be independently tunable. This value is
7920ce38 198 a WAG (wild a** guess). */
252b5132
RH
199 15,
200
7920ce38 201 /* Routines to byte-swap various sized integers from the data sections. */
252b5132 202 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
7920ce38
NC
203 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
204 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
252b5132 205
7920ce38 206 /* Routines to byte-swap various sized integers from the file headers. */
252b5132 207 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
7920ce38
NC
208 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
209 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
210
211 /* bfd_check_format: check the format of a file being read. */
212 { _bfd_dummy_target, /* Unknown format. */
213 nlmNAME(object_p), /* Assembler/linker output (object file). */
214 bfd_generic_archive_p, /* An archive. */
215 nlm_core_file_p /* A core file. */
252b5132
RH
216 },
217
7920ce38 218 /* bfd_set_format: set the format of a file being written. */
252b5132
RH
219 { bfd_false,
220 nlm_mkobject,
221 _bfd_generic_mkarchive,
222 bfd_false
223 },
224
7920ce38 225 /* bfd_write_contents: write cached information into a file being written. */
252b5132
RH
226 { bfd_false,
227 nlmNAME(write_object_contents),
228 _bfd_write_archive_contents,
229 bfd_false
230 },
231
7920ce38
NC
232 /* Initialize a jump table with the standard macro.
233 All names start with "nlm". */
252b5132
RH
234 BFD_JUMP_TABLE_GENERIC (_bfd_generic),
235 BFD_JUMP_TABLE_COPY (_bfd_generic),
236 BFD_JUMP_TABLE_CORE (_bfd_nocore),
237 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
238 BFD_JUMP_TABLE_SYMBOLS (nlm),
239 BFD_JUMP_TABLE_RELOCS (nlm),
240 BFD_JUMP_TABLE_WRITE (nlm),
241 BFD_JUMP_TABLE_LINK (nlm),
242 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
243
c3c89269
NC
244 /* Alternative endian target. */
245#ifdef TARGET_BIG_SYM
246 & TARGET_BIG_SYM,
247#else
248 NULL,
249#endif
1518639e 250
7920ce38
NC
251 /* Backend_data. */
252 (void *) TARGET_BACKEND_DATA
252b5132
RH
253};
254#endif
This page took 0.407497 seconds and 4 git commands to generate.