* reloc.c (enum complain_overflow): New enumeration with the
[deliverable/binutils-gdb.git] / bfd / libnlm.h
CommitLineData
c3e964b9
FF
1/* BFD back-end data structures for NLM (NetWare Loadable Modules) files.
2 Copyright (C) 1993 Free Software Foundation, Inc.
3 Written by Cygnus Support.
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21#ifndef _LIBNLM_H_
22#define _LIBNLM_H_ 1
23
24#include "nlm/common.h"
25#include "nlm/internal.h"
26#include "nlm/external.h"
27
28/* If size isn't specified as 64 or 32, NAME macro should fail. */
29#ifndef NAME
30# if ARCH_SIZE==64
31# define NAME(x,y) CAT4(x,64,_,y)
32# endif
33# if ARCH_SIZE==32
34# define NAME(x,y) CAT4(x,32,_,y)
35# endif
36#endif
37
38#define NlmNAME(X) NAME(Nlm,X)
39#define nlmNAME(X) NAME(nlm,X)
40
41typedef struct
42{
43 asymbol symbol;
44} nlm32_symbol_type;
45
46typedef struct
47{
48 asymbol symbol;
49} nlm64_symbol_type;
50
51#define bfd_nlm32_mkobject bfd_nlm_mkobject
52#define bfd_nlm64_mkobject bfd_nlm_mkobject
53#define nlm_mkobject bfd_nlm_mkobject
54extern boolean bfd_nlm_mkobject PARAMS ((bfd *));
55
56extern void bfd_nlm32_get_symbol_info
57 PARAMS ((bfd *, asymbol *, symbol_info *));
58extern unsigned int bfd_nlm32_get_symtab_upper_bound PARAMS ((bfd *));
59extern unsigned int bfd_nlm64_get_symtab_upper_bound PARAMS ((bfd *));
60extern unsigned int bfd_nlm32_get_symtab PARAMS ((bfd *, asymbol **));
61extern unsigned int bfd_nlm64_get_symtab PARAMS ((bfd *, asymbol **));
62extern asymbol *bfd_nlm32_make_empty_symbol PARAMS ((bfd *));
63extern asymbol *bfd_nlm64_make_empty_symbol PARAMS ((bfd *));
64extern bfd_target *bfd_nlm32_object_p PARAMS ((bfd *));
65extern bfd_target *bfd_nlm64_object_p PARAMS ((bfd *));
66extern boolean bfd_nlm32_set_arch_mach
67 PARAMS ((bfd *, enum bfd_architecture, unsigned long));
68extern boolean bfd_nlm64_set_arch_mach
69 PARAMS ((bfd *, enum bfd_architecture, unsigned long));
70
71/* Some private data is stashed away for future use using the tdata pointer
72 in the bfd structure. */
73
74struct nlm_obj_tdata
75{
76 /* Actual data, but ref like ptr */
f03b1f0d
FF
77 Nlm_Internal_Fixed_Header nlm_fixed_hdr[1];
78 Nlm_Internal_Variable_Header nlm_variable_hdr[1];
79 Nlm_Internal_Version_Header nlm_version_hdr[1];
80 Nlm_Internal_Copyright_Header nlm_copyright_hdr[1];
81 Nlm_Internal_Extended_Header nlm_extended_hdr[1];
82 Nlm_Internal_Custom_Header nlm_custom_hdr[1];
c3e964b9
FF
83};
84
85#define nlm_tdata(bfd) ((bfd) -> tdata.nlm_obj_data)
f03b1f0d
FF
86#define nlm_fixed_header(bfd) (nlm_tdata(bfd) -> nlm_fixed_hdr)
87#define nlm_variable_header(bfd) (nlm_tdata(bfd) -> nlm_variable_hdr)
88#define nlm_version_header(bfd) (nlm_tdata(bfd) -> nlm_version_hdr)
89#define nlm_copyright_header(bfd) (nlm_tdata(bfd) -> nlm_copyright_hdr)
90#define nlm_extended_header(bfd) (nlm_tdata(bfd) -> nlm_extended_hdr)
91#define nlm_custom_header(bfd) (nlm_tdata(bfd) -> nlm_custom_hdr)
c3e964b9
FF
92
93/* The NLM code, data, and uninitialized sections have no names defined
94 in the NLM, but bfd wants to give them names, so use the traditional
95 UNIX names. */
96
97#define NLM_CODE_NAME ".text"
98#define NLM_INITIALIZED_DATA_NAME ".data"
99#define NLM_UNINITIALIZED_DATA_NAME ".bss"
100
101#endif /* _LIBNLM_H_ */
This page took 0.026034 seconds and 4 git commands to generate.