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