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