]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/deffile.h
1 /* deffile.h - header for .DEF file parser
2 Copyright (C) 1998 Free Software Foundation, Inc.
3 Written by DJ Delorie dj@cygnus.com
5 This file is part of GLD, the Gnu Linker.
7 GLD 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, or (at your option)
12 GLD 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.
17 You should have received a copy of the GNU General Public License
18 along with GLD; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
24 /* DEF storage definitions. Note that any ordinal may be zero, and
25 any pointer may be NULL, if not defined by the DEF file. */
27 typedef struct def_file_section
29 char *name
; /* always set */
30 char *class; /* may be NULL */
31 char flag_read
, flag_write
, flag_execute
, flag_shared
;
35 typedef struct def_file_export
37 char *name
; /* always set */
38 char *internal_name
; /* always set, may == name */
39 int ordinal
; /* -1 if not specified */
40 char flag_private
, flag_constant
, flag_noname
, flag_data
;
44 typedef struct def_file_import
46 char *internal_name
; /* always set */
47 char *module
; /* always set */
48 char *name
; /* may be NULL; either this or ordinal will be set */
49 int ordinal
; /* may be -1 */
53 typedef struct def_file
56 /* from the NAME or LIBRARY command */
58 int is_dll
; /* -1 if NAME/LIBRARY not given */
59 bfd_vma base_address
; /* (bfd_vma)(-1) if unspecified */
61 /* from the DESCRIPTION command */
64 /* from the STACK/HEAP command, -1 if unspecified */
65 int stack_reserve
, stack_commit
;
66 int heap_reserve
, heap_commit
;
68 /* from the SECTION/SEGMENT commands */
70 def_file_section
*section_defs
;
72 /* from the EXPORTS commands */
74 def_file_export
*exports
;
76 /* from the IMPORTS commands */
78 def_file_import
*imports
;
80 /* from the VERSION command, -1 if not specified */
81 int version_major
, version_minor
;
85 extern def_file
*def_file_empty
PARAMS ((void));
87 /* add_to may be NULL. If not, this .def is appended to it */
88 extern def_file
*def_file_parse
PARAMS ((const char *_filename
,
91 extern void def_file_free
PARAMS ((def_file
* _def
));
93 extern def_file_export
*def_file_add_export
PARAMS ((def_file
* _def
,
95 const char *_internal_name
,
98 extern def_file_import
*def_file_add_import
PARAMS ((def_file
* _def
,
102 const char *_imported_name
));
104 extern int def_file_add_directive
PARAMS ((def_file
* _def
,
108 #ifdef DEF_FILE_PRINT
109 extern void def_file_print
PARAMS ((FILE * _file
,