]>
Commit | Line | Data |
---|---|---|
2fa0b342 DHW |
1 | /* ld.h - |
2 | ||
c1074477 | 3 | Copyright (C) 1991, 1993 Free Software Foundation, Inc. |
2fa0b342 DHW |
4 | |
5 | This file is part of GLD, the Gnu Linker. | |
6 | ||
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 | |
c1074477 | 9 | the Free Software Foundation; either version 2, or (at your option) |
2fa0b342 DHW |
10 | any later version. |
11 | ||
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. | |
16 | ||
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 | |
19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | ||
2a9fa50c ILT |
21 | #ifndef LD_H |
22 | #define LD_H | |
2fa0b342 | 23 | |
2fa0b342 | 24 | /* Extra information we hold on sections */ |
2a9fa50c ILT |
25 | typedef struct user_section_struct |
26 | { | |
2fa0b342 DHW |
27 | /* Pointer to the section where this data will go */ |
28 | struct lang_input_statement_struct *file; | |
29 | } section_userdata_type; | |
30 | ||
31 | ||
32 | #define get_userdata(x) ((x)->userdata) | |
2fa0b342 | 33 | |
c1074477 DE |
34 | #define BYTE_SIZE (1) |
35 | #define SHORT_SIZE (2) | |
36 | #define LONG_SIZE (4) | |
2a9fa50c | 37 | #define QUAD_SIZE (8) |
2fa0b342 | 38 | |
c1074477 DE |
39 | /* ALIGN macro changed to ALIGN_N to avoid */ |
40 | /* conflict in /usr/include/machine/machparam.h */ | |
2a9fa50c | 41 | /* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int, |
73f5d5fe DE |
42 | you must coerce boundary to the same type as THIS. |
43 | ??? Is there a portable way to avoid this. */ | |
2a9fa50c ILT |
44 | #define ALIGN_N(this, boundary) \ |
45 | ((( (this) + ((boundary) -1)) & (~((boundary)-1)))) | |
2fa0b342 | 46 | |
2a9fa50c ILT |
47 | typedef struct |
48 | { | |
2fa0b342 DHW |
49 | /* 1 => assign space to common symbols even if `relocatable_output'. */ |
50 | boolean force_common_definition; | |
c1074477 | 51 | boolean relax; |
809ee7e0 ILT |
52 | |
53 | /* Name of runtime interpreter to invoke. */ | |
54 | char *interpreter; | |
55 | ||
56 | /* Name to give runtime libary from the -soname argument. */ | |
57 | char *soname; | |
58 | ||
59 | /* Runtime library search path from the -rpath argument. */ | |
60 | char *rpath; | |
2fa0b342 DHW |
61 | } args_type; |
62 | ||
2a9fa50c ILT |
63 | extern args_type command_line; |
64 | ||
2fa0b342 DHW |
65 | typedef int token_code_type; |
66 | ||
67 | typedef struct | |
68 | { | |
c1074477 | 69 | bfd_size_type specified_data_size; |
2fa0b342 DHW |
70 | boolean magic_demand_paged; |
71 | boolean make_executable; | |
2fa0b342 | 72 | |
c96386c4 ILT |
73 | /* If true, request BFD to use the traditional format. */ |
74 | boolean traditional_format; | |
75 | ||
2a9fa50c ILT |
76 | /* If true, doing a dynamic link. */ |
77 | boolean dynamic_link; | |
78 | ||
2fa0b342 | 79 | boolean build_constructors; |
c1074477 DE |
80 | |
81 | /* If true, warn about merging common symbols with others. */ | |
82 | boolean warn_common; | |
2fa0b342 | 83 | |
809ee7e0 ILT |
84 | /* If true, only warn once about a particular undefined symbol. */ |
85 | boolean warn_once; | |
86 | ||
b6316534 | 87 | boolean sort_common; |
2a9fa50c | 88 | |
c1074477 DE |
89 | boolean text_read_only; |
90 | ||
2a9fa50c ILT |
91 | char *map_filename; |
92 | FILE *map_file; | |
c1074477 | 93 | |
2a9fa50c | 94 | boolean stats; |
2fa0b342 | 95 | } ld_config_type; |
2fa0b342 | 96 | |
2a9fa50c | 97 | extern ld_config_type config; |
2fa0b342 | 98 | |
2a9fa50c ILT |
99 | typedef enum |
100 | { | |
2fa0b342 DHW |
101 | lang_first_phase_enum, |
102 | lang_allocating_phase_enum, | |
2a9fa50c ILT |
103 | lang_final_phase_enum |
104 | } lang_phase_type; | |
2fa0b342 | 105 | |
2a9fa50c ILT |
106 | extern boolean had_script; |
107 | extern boolean force_make_executable; | |
2fa0b342 | 108 | |
2a9fa50c | 109 | extern int yyparse PARAMS ((void)); |
c1074477 | 110 | |
2a9fa50c | 111 | #endif |