1 /* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
2 Copyright (C) 1993 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
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.
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.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* This structure contains everything that BFD knows about a target.
21 It includes things like its byte order, name, what routines to call
22 to do various operations, etc. Every BFD points to a target structure
23 with its "xvec" member.
25 There are two such structures here: one for big-endian machines and
26 one for little-endian machines. */
30 bfd_target TARGET_BIG_SYM =
32 /* name: identify kind of target */
35 /* flavour: general indication about file */
36 bfd_target_nlm_flavour,
38 /* byteorder_big_p: data is big endian */
41 /* header_byteorder_big_p: header is also big endian */
44 /* object_flags: mask of all file flags */
45 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
48 /* section_flags: mask of all section flags */
49 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
52 /* leading_symbol_char: is the first char of a user symbol
53 predictable, and if so what is it */
56 /* ar_pad_char: pad character for filenames within an archive header
57 FIXME: this really has nothing to do with NLM, this is a characteristic
58 of the archiver and/or os and should be independently tunable */
61 /* ar_max_namelen: maximum number of characters in an archive header
62 FIXME: this really has nothing to do with NLM, this is a characteristic
63 of the archiver and should be independently tunable. This value is
64 a WAG (wild a** guess) */
67 /* align_power_min: minimum alignment restriction for any section
68 FIXME: this value may be target machine dependent */
71 /* Routines to byte-swap various sized integers from the data sections */
72 _do_getb64, _do_getb_signed_64, _do_putb64,
73 _do_getb32, _do_getb_signed_32, _do_putb32,
74 _do_getb16, _do_getb_signed_16, _do_putb16,
76 /* Routines to byte-swap various sized integers from the file headers */
77 _do_getb64, _do_getb_signed_64, _do_putb64,
78 _do_getb32, _do_getb_signed_32, _do_putb32,
79 _do_getb16, _do_getb_signed_16, _do_putb16,
81 /* bfd_check_format: check the format of a file being read */
82 { _bfd_dummy_target, /* unknown format */
83 nlmNAME(object_p), /* assembler/linker output (object file) */
84 bfd_generic_archive_p, /* an archive */
85 nlmNAME(core_file_p) /* a core file */
88 /* bfd_set_format: set the format of a file being written */
91 _bfd_generic_mkarchive,
95 /* bfd_write_contents: write cached information into a file being written */
97 nlmNAME(write_object_contents),
98 _bfd_write_archive_contents,
102 /* Initialize a jump table with the standard macro. All names start with
104 JUMP_TABLE(JUMP_TABLE_PREFIX),
111 #ifdef TARGET_LITTLE_SYM
112 bfd_target TARGET_LITTLE_SYM =
114 /* name: identify kind of target */
117 /* flavour: general indication about file */
118 bfd_target_nlm_flavour,
120 /* byteorder_big_p: data is big endian */
121 false, /* Nope -- this one's little endian */
123 /* header_byteorder_big_p: header is also big endian */
124 false, /* Nope -- this one's little endian */
126 /* object_flags: mask of all file flags */
127 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
130 /* section_flags: mask of all section flags */
131 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
134 /* leading_symbol_char: is the first char of a user symbol
135 predictable, and if so what is it */
138 /* ar_pad_char: pad character for filenames within an archive header
139 FIXME: this really has nothing to do with NLM, this is a characteristic
140 of the archiver and/or os and should be independently tunable */
143 /* ar_max_namelen: maximum number of characters in an archive header
144 FIXME: this really has nothing to do with NLM, this is a characteristic
145 of the archiver and should be independently tunable. This value is
146 a WAG (wild a** guess) */
149 /* align_power_min: minimum alignment restriction for any section
150 FIXME: this value may be target machine dependent */
153 /* Routines to byte-swap various sized integers from the data sections */
154 _do_getl64, _do_getl_signed_64, _do_putl64,
155 _do_getl32, _do_getl_signed_32, _do_putl32,
156 _do_getl16, _do_getl_signed_16, _do_putl16,
158 /* Routines to byte-swap various sized integers from the file headers */
159 _do_getl64, _do_getl_signed_64, _do_putl64,
160 _do_getl32, _do_getl_signed_32, _do_putl32,
161 _do_getl16, _do_getl_signed_16, _do_putl16,
163 /* bfd_check_format: check the format of a file being read */
164 { _bfd_dummy_target, /* unknown format */
165 nlmNAME(object_p), /* assembler/linker output (object file) */
166 bfd_generic_archive_p, /* an archive */
167 nlmNAME(core_file_p) /* a core file */
170 /* bfd_set_format: set the format of a file being written */
173 _bfd_generic_mkarchive,
177 /* bfd_write_contents: write cached information into a file being written */
179 nlmNAME(write_object_contents),
180 _bfd_write_archive_contents,
184 /* Initialize a jump table with the standard macro. All names start with
186 JUMP_TABLE(JUMP_TABLE_PREFIX),