* ldlang.c (lang_size_sections): If _cooked_size is not 0, then
[deliverable/binutils-gdb.git] / ld / ld.h
1 /* ld.h -
2
3 Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
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
9 the Free Software Foundation; either version 2, or (at your option)
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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21 #ifndef LD_H
22 #define LD_H
23
24 /* Look in this environment name for the linker to pretend to be */
25 #define EMULATION_ENVIRON "LDEMULATION"
26 /* If in there look for the strings: */
27
28 /* Look in this variable for a target format */
29 #define TARGET_ENVIRON "GNUTARGET"
30
31 /* Input sections which are put in a section of this name are actually
32 discarded. */
33 #define DISCARD_SECTION_NAME "/DISCARD/"
34
35 /* Extra information we hold on sections */
36 typedef struct user_section_struct
37 {
38 /* Pointer to the section where this data will go */
39 struct lang_input_statement_struct *file;
40 } section_userdata_type;
41
42
43 #define get_userdata(x) ((x)->userdata)
44
45 #define BYTE_SIZE (1)
46 #define SHORT_SIZE (2)
47 #define LONG_SIZE (4)
48 #define QUAD_SIZE (8)
49
50 /* ALIGN macro changed to ALIGN_N to avoid */
51 /* conflict in /usr/include/machine/machparam.h */
52 /* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int,
53 you must coerce boundary to the same type as THIS.
54 ??? Is there a portable way to avoid this. */
55 #define ALIGN_N(this, boundary) \
56 ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
57
58 typedef struct
59 {
60 /* 1 => assign space to common symbols even if `relocatable_output'. */
61 boolean force_common_definition;
62 boolean relax;
63
64 /* Name of runtime interpreter to invoke. */
65 char *interpreter;
66
67 /* Name to give runtime libary from the -soname argument. */
68 char *soname;
69
70 /* Runtime library search path from the -rpath argument. */
71 char *rpath;
72
73 /* Link time runtime library search path from the -rpath-link
74 argument. */
75 char *rpath_link;
76
77 /* Big or little endian as set on command line. */
78 enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
79
80 /* If true, export all symbols in the dynamic symbol table of an ELF
81 executable. */
82 boolean export_dynamic;
83
84 /* If true, build MIPS embedded PIC relocation tables in the output
85 file. */
86 boolean embedded_relocs;
87 } args_type;
88
89 extern args_type command_line;
90
91 typedef int token_code_type;
92
93 typedef struct
94 {
95 bfd_size_type specified_data_size;
96 boolean magic_demand_paged;
97 boolean make_executable;
98
99 /* If true, doing a dynamic link. */
100 boolean dynamic_link;
101
102 /* If true, build constructors. */
103 boolean build_constructors;
104
105 /* If true, warn about any constructors. */
106 boolean warn_constructors;
107
108 /* If true, warn about merging common symbols with others. */
109 boolean warn_common;
110
111 /* If true, only warn once about a particular undefined symbol. */
112 boolean warn_once;
113
114 /* If true, warn if multiple global-pointers are needed (Alpha
115 only). */
116 boolean warn_multiple_gp;
117
118 boolean sort_common;
119
120 boolean text_read_only;
121
122 char *map_filename;
123 FILE *map_file;
124
125 boolean stats;
126
127 int split_by_reloc;
128 boolean split_by_file;
129 } ld_config_type;
130
131 extern ld_config_type config;
132
133 typedef enum
134 {
135 lang_first_phase_enum,
136 lang_allocating_phase_enum,
137 lang_final_phase_enum
138 } lang_phase_type;
139
140 extern boolean had_script;
141 extern boolean force_make_executable;
142
143 /* Non-zero if we are processing a --defsym from the command line. */
144 extern int parsing_defsym;
145
146 extern int yyparse PARAMS ((void));
147
148 #endif
This page took 0.033405 seconds and 5 git commands to generate.