fix xgettext invocation
[deliverable/binutils-gdb.git] / ld / ld.h
CommitLineData
2ed9fe47 1/* ld.h -- general linker header file
8bc8f4bc 2 Copyright (C) 1991, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
2fa0b342
DHW
3
4 This file is part of GLD, the Gnu Linker.
5
6 GLD is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
c1074477 8 the Free Software Foundation; either version 2, or (at your option)
2fa0b342
DHW
9 any later version.
10
11 GLD 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.
15
16 You should have received a copy of the GNU General Public License
2ed9fe47
ILT
17 along with GLD; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA. */
2fa0b342 20
2a9fa50c
ILT
21#ifndef LD_H
22#define LD_H
2fa0b342 23
8bc8f4bc
TT
24#ifdef ENABLE_NLS
25#include <libintl.h>
26#define _(String) gettext (String)
27#ifdef gettext_noop
28#define N_(String) gettext_noop (String)
29#else
30#define N_(String) (String)
31#endif
32#else
33/* Stubs that do something close enough. */
34#define textdomain(String) (String)
35#define gettext(String) (String)
36#define dgettext(Domain,Message) (Message)
37#define dcgettext(Domain,Message,Type) (Message)
38#define bindtextdomain(Domain,Directory) (Domain)
39#define _(String) (String)
40#define N_(String) (String)
41/* In this case we don't care about the value. */
42#ifndef LC_MESSAGES
43#define LC_MESSAGES 0
44#endif
45#endif
46
6799c638
ILT
47/* Look in this environment name for the linker to pretend to be */
48#define EMULATION_ENVIRON "LDEMULATION"
49/* If in there look for the strings: */
50
51/* Look in this variable for a target format */
52#define TARGET_ENVIRON "GNUTARGET"
53
54/* Input sections which are put in a section of this name are actually
55 discarded. */
56#define DISCARD_SECTION_NAME "/DISCARD/"
57
2fa0b342 58/* Extra information we hold on sections */
2a9fa50c
ILT
59typedef struct user_section_struct
60{
2fa0b342
DHW
61 /* Pointer to the section where this data will go */
62 struct lang_input_statement_struct *file;
63} section_userdata_type;
64
65
66#define get_userdata(x) ((x)->userdata)
2fa0b342 67
c1074477
DE
68#define BYTE_SIZE (1)
69#define SHORT_SIZE (2)
70#define LONG_SIZE (4)
2a9fa50c 71#define QUAD_SIZE (8)
2fa0b342 72
c1074477
DE
73/* ALIGN macro changed to ALIGN_N to avoid */
74/* conflict in /usr/include/machine/machparam.h */
2a9fa50c 75/* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int,
73f5d5fe
DE
76 you must coerce boundary to the same type as THIS.
77 ??? Is there a portable way to avoid this. */
2a9fa50c
ILT
78#define ALIGN_N(this, boundary) \
79 ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
2fa0b342 80
2a9fa50c
ILT
81typedef struct
82{
2fa0b342
DHW
83 /* 1 => assign space to common symbols even if `relocatable_output'. */
84 boolean force_common_definition;
c1074477 85 boolean relax;
809ee7e0
ILT
86
87 /* Name of runtime interpreter to invoke. */
88 char *interpreter;
89
90 /* Name to give runtime libary from the -soname argument. */
91 char *soname;
92
93 /* Runtime library search path from the -rpath argument. */
94 char *rpath;
943fbd5b 95
6799c638
ILT
96 /* Link time runtime library search path from the -rpath-link
97 argument. */
98 char *rpath_link;
99
943fbd5b
KR
100 /* Big or little endian as set on command line. */
101 enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
102
103 /* If true, export all symbols in the dynamic symbol table of an ELF
104 executable. */
105 boolean export_dynamic;
106
107 /* If true, build MIPS embedded PIC relocation tables in the output
108 file. */
109 boolean embedded_relocs;
cd09553a
ILT
110
111 /* If true, force generation of a file with a .exe file. */
112 boolean force_exe_suffix;
113
114 /* If true, generate a cross reference report. */
115 boolean cref;
8bc8f4bc
TT
116
117 /* If true (which is the default), warn about mismatched input
118 files. */
119 boolean warn_mismatch;
120
121 /* Name of shared object whose symbol table should be filtered with
122 this shared object. From the --filter option. */
123 char *filter_shlib;
124
125 /* Name of shared object for whose symbol table this shared object
126 is an auxiliary filter. From the --auxiliary option. */
127 char **auxiliary_filters;
2fa0b342
DHW
128} args_type;
129
2a9fa50c
ILT
130extern args_type command_line;
131
2fa0b342
DHW
132typedef int token_code_type;
133
134typedef struct
135{
c1074477 136 bfd_size_type specified_data_size;
2fa0b342
DHW
137 boolean magic_demand_paged;
138 boolean make_executable;
2fa0b342 139
2a9fa50c
ILT
140 /* If true, doing a dynamic link. */
141 boolean dynamic_link;
142
6799c638 143 /* If true, build constructors. */
2fa0b342 144 boolean build_constructors;
c1074477 145
6799c638
ILT
146 /* If true, warn about any constructors. */
147 boolean warn_constructors;
148
c1074477
DE
149 /* If true, warn about merging common symbols with others. */
150 boolean warn_common;
2fa0b342 151
809ee7e0
ILT
152 /* If true, only warn once about a particular undefined symbol. */
153 boolean warn_once;
154
6799c638
ILT
155 /* If true, warn if multiple global-pointers are needed (Alpha
156 only). */
157 boolean warn_multiple_gp;
158
8bc8f4bc
TT
159 /* If true, warn if the starting address of an output section
160 changes due to the alignment of an input section. */
161 boolean warn_section_align;
162
b6316534 163 boolean sort_common;
2a9fa50c 164
c1074477
DE
165 boolean text_read_only;
166
2a9fa50c
ILT
167 char *map_filename;
168 FILE *map_file;
c1074477 169
2a9fa50c 170 boolean stats;
943fbd5b
KR
171
172 int split_by_reloc;
173 boolean split_by_file;
2fa0b342 174} ld_config_type;
2fa0b342 175
2a9fa50c 176extern ld_config_type config;
2fa0b342 177
2a9fa50c
ILT
178typedef enum
179{
2fa0b342
DHW
180 lang_first_phase_enum,
181 lang_allocating_phase_enum,
2a9fa50c
ILT
182 lang_final_phase_enum
183} lang_phase_type;
2fa0b342 184
2a9fa50c
ILT
185extern boolean had_script;
186extern boolean force_make_executable;
2fa0b342 187
6799c638
ILT
188/* Non-zero if we are processing a --defsym from the command line. */
189extern int parsing_defsym;
190
2a9fa50c 191extern int yyparse PARAMS ((void));
c1074477 192
cd09553a
ILT
193extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma));
194extern void output_cref PARAMS ((FILE *));
8bc8f4bc 195extern void check_nocrossrefs PARAMS ((void));
cd09553a 196
2a9fa50c 197#endif
This page took 0.228262 seconds and 4 git commands to generate.