* buildsym.c (watch_main_source_file_lossage): New fn.
[deliverable/binutils-gdb.git] / gold / options.h
CommitLineData
bae7f79e
ILT
1// options.h -- handle command line options for gold -*- C++ -*-
2
e5756efb 3// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
6cb15b7f
ILT
4// Written by Ian Lance Taylor <iant@google.com>.
5
6// This file is part of gold.
7
8// This program is free software; you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation; either version 3 of the License, or
11// (at your option) any later version.
12
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21// MA 02110-1301, USA.
22
bae7f79e 23// General_options (from Command_line::options())
ee1fe73e 24// All the options (a.k.a. command-line flags)
bae7f79e
ILT
25// Input_argument (from Command_line::inputs())
26// The list of input files, including -l options.
ee1fe73e
ILT
27// Command_line
28// Everything we get from the command line -- the General_options
29// plus the Input_arguments.
30//
31// There are also some smaller classes, such as
32// Position_dependent_options which hold a subset of General_options
33// that change as options are parsed (as opposed to the usual behavior
34// of the last instance of that option specified on the commandline wins).
bae7f79e
ILT
35
36#ifndef GOLD_OPTIONS_H
37#define GOLD_OPTIONS_H
38
ca3a67a5 39#include <cstdlib>
cbb93e63 40#include <cstring>
bae7f79e 41#include <list>
61ba1cf9 42#include <string>
92e059d8 43#include <vector>
bae7f79e 44
0daa6f62 45#include "elfcpp.h"
3c2fafa5
ILT
46#include "script.h"
47
bae7f79e
ILT
48namespace gold
49{
50
51class Command_line;
ee1fe73e
ILT
52class General_options;
53class Search_directory;
ead1e424 54class Input_file_group;
3c2fafa5 55class Position_dependent_options;
0daa6f62 56class Target;
bae7f79e 57
ee1fe73e
ILT
58// The nested namespace is to contain all the global variables and
59// structs that need to be defined in the .h file, but do not need to
60// be used outside this class.
c7912668
ILT
61namespace options
62{
ee1fe73e
ILT
63typedef std::vector<Search_directory> Dir_list;
64
65// These routines convert from a string option to various types.
66// Each gives a fatal error if it cannot parse the argument.
67
68extern void
69parse_bool(const char* option_name, const char* arg, bool* retval);
70
71extern void
72parse_uint(const char* option_name, const char* arg, int* retval);
73
74extern void
c18476e7
ILT
75parse_uint64(const char* option_name, const char* arg, uint64_t* retval);
76
77extern void
78parse_double(const char* option_name, const char* arg, double* retval);
ee1fe73e
ILT
79
80extern void
81parse_string(const char* option_name, const char* arg, const char** retval);
82
086a1841
ILT
83extern void
84parse_optional_string(const char* option_name, const char* arg,
85 const char** retval);
86
ee1fe73e
ILT
87extern void
88parse_dirlist(const char* option_name, const char* arg, Dir_list* retval);
89
90extern void
91parse_choices(const char* option_name, const char* arg, const char** retval,
92 const char* choices[], int num_choices);
93
94struct Struct_var;
95
96// Most options have both a shortname (one letter) and a longname.
97// This enum controls how many dashes are expected for longname access
98// -- shortnames always use one dash. Most longnames will accept
99// either one dash or two; the only difference between ONE_DASH and
100// TWO_DASHES is how we print the option in --help. However, some
101// longnames require two dashes, and some require only one. The
102// special value DASH_Z means that the option is preceded by "-z".
103enum Dashes
104{
105 ONE_DASH, TWO_DASHES, EXACTLY_ONE_DASH, EXACTLY_TWO_DASHES, DASH_Z
106};
107
108// LONGNAME is the long-name of the option with dashes converted to
109// underscores, or else the short-name if the option has no long-name.
110// It is never the empty string.
111// DASHES is an instance of the Dashes enum: ONE_DASH, TWO_DASHES, etc.
112// SHORTNAME is the short-name of the option, as a char, or '\0' if the
113// option has no short-name. If the option has no long-name, you
114// should specify the short-name in *both* VARNAME and here.
115// DEFAULT_VALUE is the value of the option if not specified on the
116// commandline, as a string.
117// HELPSTRING is the descriptive text used with the option via --help
118// HELPARG is how you define the argument to the option.
119// --help output is "-shortname HELPARG, --longname HELPARG: HELPSTRING"
120// HELPARG should be NULL iff the option is a bool and takes no arg.
086a1841
ILT
121// OPTIONAL_ARG is true if this option takes an optional argument. An
122// optional argument must be specifid as --OPTION=VALUE, not
123// --OPTION VALUE.
ee1fe73e
ILT
124// READER provides parse_to_value, which is a function that will convert
125// a char* argument into the proper type and store it in some variable.
126// A One_option struct initializes itself with the global list of options
127// at constructor time, so be careful making one of these.
128struct One_option
129{
130 std::string longname;
131 Dashes dashes;
132 char shortname;
133 const char* default_value;
134 const char* helpstring;
135 const char* helparg;
086a1841 136 bool optional_arg;
ee1fe73e
ILT
137 Struct_var* reader;
138
139 One_option(const char* ln, Dashes d, char sn, const char* dv,
086a1841 140 const char* hs, const char* ha, bool oa, Struct_var* r)
ee1fe73e 141 : longname(ln), dashes(d), shortname(sn), default_value(dv ? dv : ""),
086a1841 142 helpstring(hs), helparg(ha), optional_arg(oa), reader(r)
ee1fe73e
ILT
143 {
144 // In longname, we convert all underscores to dashes, since GNU
145 // style uses dashes in option names. longname is likely to have
146 // underscores in it because it's also used to declare a C++
147 // function.
148 const char* pos = strchr(this->longname.c_str(), '_');
149 for (; pos; pos = strchr(pos, '_'))
150 this->longname[pos - this->longname.c_str()] = '-';
151
152 // We only register ourselves if our helpstring is not NULL. This
153 // is to support the "no-VAR" boolean variables, which we
154 // conditionally turn on by defining "no-VAR" help text.
155 if (this->helpstring)
156 this->register_option();
157 }
158
159 // This option takes an argument iff helparg is not NULL.
160 bool
161 takes_argument() const
162 { return this->helparg != NULL; }
163
086a1841
ILT
164 // Whether the argument is optional.
165 bool
166 takes_optional_argument() const
167 { return this->optional_arg; }
168
ee1fe73e
ILT
169 // Register this option with the global list of options.
170 void
171 register_option();
172
173 // Print this option to stdout (used with --help).
174 void
175 print() const;
176};
177
178// All options have a Struct_##varname that inherits from this and
179// actually implements parse_to_value for that option.
180struct Struct_var
181{
182 // OPTION: the name of the option as specified on the commandline,
183 // including leading dashes, and any text following the option:
184 // "-O", "--defsym=mysym=0x1000", etc.
185 // ARG: the arg associated with this option, or NULL if the option
186 // takes no argument: "2", "mysym=0x1000", etc.
187 // CMDLINE: the global Command_line object. Used by DEFINE_special.
188 // OPTIONS: the global General_options object. Used by DEFINE_special.
189 virtual void
190 parse_to_value(const char* option, const char* arg,
191 Command_line* cmdline, General_options* options) = 0;
192 virtual
193 ~Struct_var() // To make gcc happy.
194 { }
195};
bae7f79e 196
ee1fe73e
ILT
197// This is for "special" options that aren't of any predefined type.
198struct Struct_special : public Struct_var
199{
200 // If you change this, change the parse-fn in DEFINE_special as well.
201 typedef void (General_options::*Parse_function)(const char*, const char*,
202 Command_line*);
203 Struct_special(const char* varname, Dashes dashes, char shortname,
204 Parse_function parse_function,
205 const char* helpstring, const char* helparg)
086a1841 206 : option(varname, dashes, shortname, "", helpstring, helparg, false, this),
ee1fe73e
ILT
207 parse(parse_function)
208 { }
209
210 void parse_to_value(const char* option, const char* arg,
211 Command_line* cmdline, General_options* options)
212 { (options->*(this->parse))(option, arg, cmdline); }
213
214 One_option option;
215 Parse_function parse;
216};
217
218} // End namespace options.
219
220
221// These are helper macros use by DEFINE_uint64/etc below.
222// This macro is used inside the General_options_ class, so defines
223// var() and set_var() as General_options methods. Arguments as are
224// for the constructor for One_option. param_type__ is the same as
225// type__ for built-in types, and "const type__ &" otherwise.
226#define DEFINE_var(varname__, dashes__, shortname__, default_value__, \
227 default_value_as_string__, helpstring__, helparg__, \
086a1841 228 optional_arg__, type__, param_type__, parse_fn__) \
ee1fe73e
ILT
229 public: \
230 param_type__ \
231 varname__() const \
232 { return this->varname__##_.value; } \
233 \
234 bool \
235 user_set_##varname__() const \
236 { return this->varname__##_.user_set_via_option; } \
237 \
238 private: \
239 struct Struct_##varname__ : public options::Struct_var \
240 { \
241 Struct_##varname__() \
242 : option(#varname__, dashes__, shortname__, default_value_as_string__, \
086a1841 243 helpstring__, helparg__, optional_arg__, this), \
ee1fe73e
ILT
244 user_set_via_option(false), value(default_value__) \
245 { } \
246 \
247 void \
248 parse_to_value(const char* option_name, const char* arg, \
249 Command_line*, General_options*) \
250 { \
251 parse_fn__(option_name, arg, &this->value); \
252 this->user_set_via_option = true; \
253 } \
254 \
255 options::One_option option; \
256 bool user_set_via_option; \
257 type__ value; \
258 }; \
259 Struct_##varname__ varname__##_; \
260 void \
261 set_##varname__(param_type__ value) \
262 { this->varname__##_.value = value; }
263
264// These macros allow for easy addition of a new commandline option.
265
266// If no_helpstring__ is not NULL, then in addition to creating
267// VARNAME, we also create an option called no-VARNAME.
268#define DEFINE_bool(varname__, dashes__, shortname__, default_value__, \
269 helpstring__, no_helpstring__) \
270 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
271 default_value__ ? "true" : "false", helpstring__, NULL, \
086a1841 272 false, bool, bool, options::parse_bool) \
ee1fe73e
ILT
273 struct Struct_no_##varname__ : public options::Struct_var \
274 { \
275 Struct_no_##varname__() : option("no-" #varname__, dashes__, '\0', \
276 default_value__ ? "false" : "true", \
086a1841 277 no_helpstring__, NULL, false, this) \
ee1fe73e
ILT
278 { } \
279 \
280 void \
281 parse_to_value(const char*, const char*, \
282 Command_line*, General_options* options) \
283 { options->set_##varname__(false); } \
284 \
285 options::One_option option; \
286 }; \
287 Struct_no_##varname__ no_##varname__##_initializer_
288
7c414435
DM
289#define DEFINE_enable(varname__, dashes__, shortname__, default_value__, \
290 helpstring__, no_helpstring__) \
291 DEFINE_var(enable_##varname__, dashes__, shortname__, default_value__, \
292 default_value__ ? "true" : "false", helpstring__, NULL, \
293 false, bool, bool, options::parse_bool) \
294 struct Struct_disable_##varname__ : public options::Struct_var \
295 { \
296 Struct_disable_##varname__() : option("disable-" #varname__, \
297 dashes__, '\0', \
298 default_value__ ? "false" : "true", \
299 no_helpstring__, NULL, false, this) \
300 { } \
301 \
302 void \
303 parse_to_value(const char*, const char*, \
304 Command_line*, General_options* options) \
305 { options->set_enable_##varname__(false); } \
306 \
307 options::One_option option; \
308 }; \
309 Struct_disable_##varname__ disable_##varname__##_initializer_
310
ee1fe73e
ILT
311#define DEFINE_uint(varname__, dashes__, shortname__, default_value__, \
312 helpstring__, helparg__) \
313 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
086a1841 314 #default_value__, helpstring__, helparg__, false, \
ee1fe73e
ILT
315 int, int, options::parse_uint)
316
317#define DEFINE_uint64(varname__, dashes__, shortname__, default_value__, \
318 helpstring__, helparg__) \
319 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
086a1841 320 #default_value__, helpstring__, helparg__, false, \
ee1fe73e
ILT
321 uint64_t, uint64_t, options::parse_uint64)
322
c18476e7
ILT
323#define DEFINE_double(varname__, dashes__, shortname__, default_value__, \
324 helpstring__, helparg__) \
325 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
086a1841 326 #default_value__, helpstring__, helparg__, false, \
c18476e7
ILT
327 double, double, options::parse_double)
328
ee1fe73e
ILT
329#define DEFINE_string(varname__, dashes__, shortname__, default_value__, \
330 helpstring__, helparg__) \
331 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
086a1841 332 default_value__, helpstring__, helparg__, false, \
ee1fe73e
ILT
333 const char*, const char*, options::parse_string)
334
335// This is like DEFINE_string, but we convert each occurrence to a
336// Search_directory and store it in a vector. Thus we also have the
337// add_to_VARNAME() method, to append to the vector.
338#define DEFINE_dirlist(varname__, dashes__, shortname__, \
339 helpstring__, helparg__) \
340 DEFINE_var(varname__, dashes__, shortname__, , \
086a1841 341 "", helpstring__, helparg__, false, options::Dir_list, \
ee1fe73e
ILT
342 const options::Dir_list&, options::parse_dirlist) \
343 void \
344 add_to_##varname__(const char* new_value) \
345 { options::parse_dirlist(NULL, new_value, &this->varname__##_.value); } \
346 void \
347 add_search_directory_to_##varname__(const Search_directory& dir) \
348 { this->varname__##_.value.push_back(dir); }
349
350// When you have a list of possible values (expressed as string)
351// After helparg__ should come an initializer list, like
352// {"foo", "bar", "baz"}
353#define DEFINE_enum(varname__, dashes__, shortname__, default_value__, \
354 helpstring__, helparg__, ...) \
355 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
086a1841 356 default_value__, helpstring__, helparg__, false, \
ee1fe73e
ILT
357 const char*, const char*, parse_choices_##varname__) \
358 private: \
359 static void parse_choices_##varname__(const char* option_name, \
360 const char* arg, \
361 const char** retval) { \
362 const char* choices[] = __VA_ARGS__; \
363 options::parse_choices(option_name, arg, retval, \
364 choices, sizeof(choices) / sizeof(*choices)); \
365 }
366
367// This is used for non-standard flags. It defines no functions; it
368// just calls General_options::parse_VARNAME whenever the flag is
369// seen. We declare parse_VARNAME as a static member of
370// General_options; you are responsible for defining it there.
371// helparg__ should be NULL iff this special-option is a boolean.
372#define DEFINE_special(varname__, dashes__, shortname__, \
373 helpstring__, helparg__) \
374 private: \
375 void parse_##varname__(const char* option, const char* arg, \
376 Command_line* inputs); \
377 struct Struct_##varname__ : public options::Struct_special \
378 { \
379 Struct_##varname__() \
380 : options::Struct_special(#varname__, dashes__, shortname__, \
381 &General_options::parse_##varname__, \
382 helpstring__, helparg__) \
383 { } \
384 }; \
385 Struct_##varname__ varname__##_initializer_
bae7f79e 386
086a1841
ILT
387// An option that takes an optional string argument. If the option is
388// used with no argument, the value will be the default, and
389// user_set_via_option will be true.
390#define DEFINE_optional_string(varname__, dashes__, shortname__, \
391 default_value__, \
392 helpstring__, helparg__) \
393 DEFINE_var(varname__, dashes__, shortname__, default_value__, \
394 default_value__, helpstring__, helparg__, true, \
395 const char*, const char*, options::parse_optional_string)
bae7f79e 396
ad2d6943
ILT
397// A directory to search. For each directory we record whether it is
398// in the sysroot. We need to know this so that, if a linker script
399// is found within the sysroot, we will apply the sysroot to any files
400// named by that script.
401
402class Search_directory
403{
404 public:
405 // We need a default constructor because we put this in a
406 // std::vector.
407 Search_directory()
408 : name_(NULL), put_in_sysroot_(false), is_in_sysroot_(false)
409 { }
410
411 // This is the usual constructor.
412 Search_directory(const char* name, bool put_in_sysroot)
413 : name_(name), put_in_sysroot_(put_in_sysroot), is_in_sysroot_(false)
15893b88
ILT
414 {
415 if (this->name_.empty())
416 this->name_ = ".";
417 }
ad2d6943
ILT
418
419 // This is called if we have a sysroot. The sysroot is prefixed to
420 // any entries for which put_in_sysroot_ is true. is_in_sysroot_ is
421 // set to true for any enries which are in the sysroot (this will
422 // naturally include any entries for which put_in_sysroot_ is true).
423 // SYSROOT is the sysroot, CANONICAL_SYSROOT is the result of
424 // passing SYSROOT to lrealpath.
425 void
426 add_sysroot(const char* sysroot, const char* canonical_sysroot);
427
428 // Get the directory name.
429 const std::string&
430 name() const
431 { return this->name_; }
432
433 // Return whether this directory is in the sysroot.
434 bool
435 is_in_sysroot() const
436 { return this->is_in_sysroot_; }
437
438 private:
439 std::string name_;
440 bool put_in_sysroot_;
441 bool is_in_sysroot_;
442};
443
bae7f79e
ILT
444class General_options
445{
ee1fe73e
ILT
446 private:
447 // NOTE: For every option that you add here, also consider if you
448 // should add it to Position_dependent_options.
449 DEFINE_special(help, options::TWO_DASHES, '\0',
a4d4b13f 450 N_("Report usage information"), NULL);
ee1fe73e 451 DEFINE_special(version, options::TWO_DASHES, 'v',
a4d4b13f 452 N_("Report version information"), NULL);
ee1fe73e 453
fee2edb1
ILT
454 // These options are sorted approximately so that for each letter in
455 // the alphabet, we show the option whose shortname is that letter
456 // (if any) and then every longname that starts with that letter (in
457 // alphabetical order). For both, lowercase sorts before uppercase.
458 // The -z options come last.
459
ee1fe73e 460 DEFINE_bool(allow_shlib_undefined, options::TWO_DASHES, '\0', false,
a4d4b13f
ILT
461 N_("Allow unresolved references in shared libraries"),
462 N_("Do not allow unresolved references in shared libraries"));
ee1fe73e
ILT
463
464 DEFINE_bool(as_needed, options::TWO_DASHES, '\0', false,
a4d4b13f
ILT
465 N_("Only set DT_NEEDED for dynamic libs if used"),
466 N_("Always DT_NEEDED for dynamic libs"));
ee1fe73e 467
fee2edb1
ILT
468 // This should really be an "enum", but it's too easy for folks to
469 // forget to update the list as they add new targets. So we just
470 // accept any string. We'll fail later (when the string is parsed),
471 // if the target isn't actually supported.
472 DEFINE_string(format, options::TWO_DASHES, 'b', "elf",
473 N_("Set input format"), ("[elf,binary]"));
474
ee1fe73e 475 DEFINE_bool(Bdynamic, options::ONE_DASH, '\0', true,
a4d4b13f 476 N_("-l searches for shared libraries"), NULL);
ee1fe73e
ILT
477 // Bstatic affects the same variable as Bdynamic, so we have to use
478 // the "special" macro to make that happen.
479 DEFINE_special(Bstatic, options::ONE_DASH, '\0',
a4d4b13f 480 N_("-l does not search for shared libraries"), NULL);
ee1fe73e
ILT
481
482 DEFINE_bool(Bsymbolic, options::ONE_DASH, '\0', false,
a4d4b13f 483 N_("Bind defined symbols locally"), NULL);
ee1fe73e 484
8ed814a9
ILT
485 DEFINE_optional_string(build_id, options::TWO_DASHES, '\0', "sha1",
486 N_("Generate build ID note"),
487 N_("[=STYLE]"));
488
ee1fe73e
ILT
489#ifdef HAVE_ZLIB_H
490 DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
a4d4b13f
ILT
491 N_("Compress .debug_* sections in the output file"),
492 ("[none,zlib]"),
ee1fe73e
ILT
493 {"none", "zlib"});
494#else
495 DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
a4d4b13f
ILT
496 N_("Compress .debug_* sections in the output file"),
497 N_("[none]"),
ee1fe73e
ILT
498 {"none"});
499#endif
0dfbdef4 500
ee1fe73e 501 DEFINE_bool(define_common, options::TWO_DASHES, 'd', false,
a4d4b13f
ILT
502 N_("Define common symbols"),
503 N_("Do not define common symbols"));
ee1fe73e 504 DEFINE_bool(dc, options::ONE_DASH, '\0', false,
a4d4b13f 505 N_("Alias for -d"), NULL);
ee1fe73e 506 DEFINE_bool(dp, options::ONE_DASH, '\0', false,
a4d4b13f 507 N_("Alias for -d"), NULL);
d391083d 508
fee2edb1 509 DEFINE_string(debug, options::TWO_DASHES, '\0', "",
2285a610
ILT
510 N_("Turn on debugging"),
511 N_("[all,files,script,task][,...]"));
fee2edb1 512
ee1fe73e 513 DEFINE_special(defsym, options::TWO_DASHES, '\0',
a4d4b13f 514 N_("Define a symbol"), N_("SYMBOL=EXPRESSION"));
a6badf5a 515
086a1841
ILT
516 DEFINE_optional_string(demangle, options::TWO_DASHES, '\0', NULL,
517 N_("Demangle C++ symbols in log messages"),
518 N_("[=STYLE]"));
519
520 DEFINE_bool(no_demangle, options::TWO_DASHES, '\0', false,
521 N_("Do not demangle C++ symbols in log messages"),
522 NULL);
fced7afd 523
ee1fe73e 524 DEFINE_bool(detect_odr_violations, options::TWO_DASHES, '\0', false,
a4d4b13f 525 N_("Try to detect violations of the One Definition Rule"),
ee1fe73e
ILT
526 NULL);
527
528 DEFINE_string(entry, options::TWO_DASHES, 'e', NULL,
a4d4b13f 529 N_("Set program start address"), N_("ADDRESS"));
ee1fe73e
ILT
530
531 DEFINE_bool(export_dynamic, options::TWO_DASHES, 'E', false,
a4d4b13f 532 N_("Export all dynamic symbols"), NULL);
dbe717ef 533
ee1fe73e 534 DEFINE_bool(eh_frame_hdr, options::TWO_DASHES, '\0', false,
a4d4b13f 535 N_("Create exception frame header"), NULL);
ee1fe73e
ILT
536
537 DEFINE_string(soname, options::ONE_DASH, 'h', NULL,
a4d4b13f 538 N_("Set shared library name"), N_("FILENAME"));
ee1fe73e 539
c18476e7
ILT
540 DEFINE_double(hash_bucket_empty_fraction, options::TWO_DASHES, '\0', 0.0,
541 N_("Min fraction of empty buckets in dynamic hash"),
542 N_("FRACTION"));
543
13670ee6 544 DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "sysv",
a4d4b13f 545 N_("Dynamic hash style"), N_("[sysv,gnu,both]"),
13670ee6
ILT
546 {"sysv", "gnu", "both"});
547
ee1fe73e 548 DEFINE_string(dynamic_linker, options::TWO_DASHES, 'I', NULL,
a4d4b13f 549 N_("Set dynamic linker path"), N_("PROGRAM"));
ee1fe73e 550
fee2edb1
ILT
551 DEFINE_special(just_symbols, options::TWO_DASHES, '\0',
552 N_("Read only symbol values from FILE"), N_("FILE"));
553
ee1fe73e 554 DEFINE_special(library, options::TWO_DASHES, 'l',
a4d4b13f 555 N_("Search for library LIBNAME"), N_("LIBNAME"));
bae7f79e 556
ee1fe73e 557 DEFINE_dirlist(library_path, options::TWO_DASHES, 'L',
a4d4b13f 558 N_("Add directory to search path"), N_("DIR"));
ee1fe73e
ILT
559
560 DEFINE_string(m, options::EXACTLY_ONE_DASH, 'm', "",
a4d4b13f 561 N_("Ignored for compatibility"), N_("EMULATION"));
ee1fe73e 562
7c414435
DM
563 DEFINE_enable(new_dtags, options::EXACTLY_TWO_DASHES, '\0', false,
564 N_("Enable use of DT_RUNPATH and DT_FLAGS"),
565 N_("Disable use of DT_RUNPATH and DT_FLAGS"));
566
cdb0b8f5
ILT
567 DEFINE_bool(noinhibit_exec, options::TWO_DASHES, '\0', false,
568 N_("Create an output file even if errors occur"), NULL);
569
ee1fe73e 570 DEFINE_string(output, options::TWO_DASHES, 'o', "a.out",
a4d4b13f 571 N_("Set output file name"), N_("FILE"));
ee1fe73e
ILT
572
573 DEFINE_uint(optimize, options::EXACTLY_ONE_DASH, 'O', 0,
a4d4b13f 574 N_("Optimize output file size"), N_("LEVEL"));
ee1fe73e 575
a4d4b13f
ILT
576 DEFINE_string(oformat, options::EXACTLY_TWO_DASHES, '\0', "elf",
577 N_("Set output format"), N_("[binary]"));
ee1fe73e
ILT
578
579 DEFINE_bool(emit_relocs, options::TWO_DASHES, 'q', false,
a4d4b13f 580 N_("Generate relocations in output"), NULL);
ee1fe73e
ILT
581
582 DEFINE_bool(relocatable, options::EXACTLY_ONE_DASH, 'r', false,
a4d4b13f 583 N_("Generate relocatable output"), NULL);
ee1fe73e 584
706e1f5e
ILT
585 DEFINE_bool(relax, options::TWO_DASHES, '\0', false,
586 N_("Relax branches on certain targets"), NULL);
587
ee1fe73e
ILT
588 // -R really means -rpath, but can mean --just-symbols for
589 // compatibility with GNU ld. -rpath is always -rpath, so we list
590 // it separately.
591 DEFINE_special(R, options::EXACTLY_ONE_DASH, 'R',
a4d4b13f 592 N_("Add DIR to runtime search path"), N_("DIR"));
ee1fe73e
ILT
593
594 DEFINE_dirlist(rpath, options::ONE_DASH, '\0',
a4d4b13f 595 N_("Add DIR to runtime search path"), N_("DIR"));
ee1fe73e 596
ee1fe73e 597 DEFINE_dirlist(rpath_link, options::TWO_DASHES, '\0',
a4d4b13f
ILT
598 N_("Add DIR to link time shared library search path"),
599 N_("DIR"));
ee1fe73e
ILT
600
601 DEFINE_bool(strip_all, options::TWO_DASHES, 's', false,
a4d4b13f 602 N_("Strip all symbols"), NULL);
fee2edb1
ILT
603 DEFINE_bool(strip_debug, options::TWO_DASHES, 'S', false,
604 N_("Strip debugging information"), NULL);
ee1fe73e 605 DEFINE_bool(strip_debug_gdb, options::TWO_DASHES, '\0', false,
a4d4b13f 606 N_("Strip debug symbols that are unused by gdb "
ee1fe73e 607 "(at least versions <= 6.7)"), NULL);
ee1fe73e
ILT
608
609 DEFINE_bool(shared, options::ONE_DASH, '\0', false,
a4d4b13f 610 N_("Generate shared library"), NULL);
ee1fe73e
ILT
611
612 // This is not actually special in any way, but I need to give it
613 // a non-standard accessor-function name because 'static' is a keyword.
614 DEFINE_special(static, options::ONE_DASH, '\0',
a4d4b13f 615 N_("Do not link against shared libraries"), NULL);
ee1fe73e
ILT
616
617 DEFINE_bool(stats, options::TWO_DASHES, '\0', false,
a4d4b13f 618 N_("Print resource usage statistics"), NULL);
ee1fe73e
ILT
619
620 DEFINE_string(sysroot, options::TWO_DASHES, '\0', "",
a4d4b13f 621 N_("Set target system root directory"), N_("DIR"));
ee1fe73e 622
ee1fe73e 623 DEFINE_special(script, options::TWO_DASHES, 'T',
a4d4b13f 624 N_("Read linker script"), N_("FILE"));
ee1fe73e
ILT
625
626 DEFINE_bool(threads, options::TWO_DASHES, '\0', false,
a4d4b13f
ILT
627 N_("Run the linker multi-threaded"),
628 N_("Do not run the linker multi-threaded"));
ee1fe73e 629 DEFINE_uint(thread_count, options::TWO_DASHES, '\0', 0,
a4d4b13f 630 N_("Number of threads to use"), N_("COUNT"));
ee1fe73e 631 DEFINE_uint(thread_count_initial, options::TWO_DASHES, '\0', 0,
a4d4b13f 632 N_("Number of threads to use in initial pass"), N_("COUNT"));
ee1fe73e 633 DEFINE_uint(thread_count_middle, options::TWO_DASHES, '\0', 0,
a4d4b13f 634 N_("Number of threads to use in middle pass"), N_("COUNT"));
ee1fe73e 635 DEFINE_uint(thread_count_final, options::TWO_DASHES, '\0', 0,
a4d4b13f 636 N_("Number of threads to use in final pass"), N_("COUNT"));
ee1fe73e 637
fee2edb1
ILT
638 DEFINE_uint64(Tbss, options::ONE_DASH, '\0', -1U,
639 N_("Set the address of the bss segment"), N_("ADDRESS"));
640 DEFINE_uint64(Tdata, options::ONE_DASH, '\0', -1U,
641 N_("Set the address of the data segment"), N_("ADDRESS"));
642 DEFINE_uint64(Ttext, options::ONE_DASH, '\0', -1U,
643 N_("Set the address of the text segment"), N_("ADDRESS"));
644
2285a610
ILT
645 DEFINE_bool(verbose, options::TWO_DASHES, '\0', false,
646 N_("Synonym for --debug=files"), NULL);
647
fee2edb1
ILT
648 DEFINE_special(version_script, options::TWO_DASHES, '\0',
649 N_("Read version script"), N_("FILE"));
650
ee1fe73e 651 DEFINE_bool(whole_archive, options::TWO_DASHES, '\0', false,
a4d4b13f
ILT
652 N_("Include all archive contents"),
653 N_("Include only needed archive contents"));
ee1fe73e 654
0864d551
ILT
655 DEFINE_special(wrap, options::TWO_DASHES, '\0',
656 N_("Use wrapper functions for SYMBOL"), N_("SYMBOL"));
657
706e1f5e
ILT
658 DEFINE_string(Y, options::EXACTLY_ONE_DASH, 'Y', "",
659 N_("Default search path for Solaris compatibility"),
660 N_("PATH"));
661
ee1fe73e 662 DEFINE_special(start_group, options::TWO_DASHES, '(',
a4d4b13f 663 N_("Start a library search group"), NULL);
ee1fe73e 664 DEFINE_special(end_group, options::TWO_DASHES, ')',
a4d4b13f 665 N_("End a library search group"), NULL);
ee1fe73e 666
fee2edb1 667 // The -z options.
ee1fe73e
ILT
668
669 // Both execstack and noexecstack differ from the default execstack_
670 // value, so we need to use different variables for them.
fee2edb1
ILT
671 DEFINE_uint64(common_page_size, options::DASH_Z, '\0', 0,
672 N_("Set common page size to SIZE"), N_("SIZE"));
eb42429a
ILT
673 DEFINE_bool(defs, options::DASH_Z, '\0', false,
674 N_("Report undefined symbols (even with --shared)"),
675 NULL);
ee1fe73e 676 DEFINE_bool(execstack, options::DASH_Z, '\0', false,
a4d4b13f 677 N_("Mark output as requiring executable stack"), NULL);
ee1fe73e 678 DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0,
a4d4b13f 679 N_("Set maximum page size to SIZE"), N_("SIZE"));
fee2edb1
ILT
680 DEFINE_bool(noexecstack, options::DASH_Z, '\0', false,
681 N_("Mark output as not requiring executable stack"), NULL);
7c414435
DM
682 DEFINE_bool(initfirst, options::DASH_Z, '\0', false,
683 N_("Mark DSO to be initialized first at runtime"),
684 NULL);
685 DEFINE_bool(interpose, options::DASH_Z, '\0', false,
686 N_("Mark object to interpose all DSOs but executable"),
687 NULL);
688 DEFINE_bool(loadfltr, options::DASH_Z, '\0', false,
689 N_("Mark object requiring immediate process"),
690 NULL);
691 DEFINE_bool(nodefaultlib, options::DASH_Z, '\0', false,
692 N_("Mark object not to use default search paths"),
693 NULL);
694 DEFINE_bool(nodelete, options::DASH_Z, '\0', false,
695 N_("Mark DSO non-deletable at runtime"),
696 NULL);
697 DEFINE_bool(nodlopen, options::DASH_Z, '\0', false,
698 N_("Mark DSO not available to dlopen"),
699 NULL);
700 DEFINE_bool(nodump, options::DASH_Z, '\0', false,
701 N_("Mark DSO not available to dldump"),
702 NULL);
bae7f79e 703
ee1fe73e
ILT
704 public:
705 typedef options::Dir_list Dir_list;
ca3a67a5 706
ee1fe73e 707 General_options();
61ba1cf9 708
ee1fe73e
ILT
709 // Does post-processing on flags, making sure they all have
710 // non-conflicting values. Also converts some flags from their
711 // "standard" types (string, etc), to another type (enum, DirList),
712 // which can be accessed via a separate method. Dies if it notices
713 // any problems.
714 void finalize();
516cb3d0 715
ee1fe73e
ILT
716 // The macro defines output() (based on --output), but that's a
717 // generic name. Provide this alternative name, which is clearer.
8851ecca 718 const char*
ee1fe73e
ILT
719 output_file_name() const
720 { return this->output(); }
92e059d8 721
8851ecca
ILT
722 // This is not defined via a flag, but combines flags to say whether
723 // the output is position-independent or not.
724 bool
725 output_is_position_independent() const
726 { return this->shared(); }
727
ee1fe73e
ILT
728 // This would normally be static(), and defined automatically, but
729 // since static is a keyword, we need to come up with our own name.
bae7f79e
ILT
730 bool
731 is_static() const
ee1fe73e 732 { return static_; }
756ac4a8 733
ee1fe73e
ILT
734 // In addition to getting the input and output formats as a string
735 // (via format() and oformat()), we also give access as an enum.
736 enum Object_format
737 {
738 // Ordinary ELF.
739 OBJECT_FORMAT_ELF,
740 // Straight binary format.
741 OBJECT_FORMAT_BINARY
742 };
fe9a4c12 743
ee1fe73e
ILT
744 // Note: these functions are not very fast.
745 Object_format format_enum() const;
746 Object_format oformat_enum() const;
fe9a4c12 747
ee1fe73e
ILT
748 // These are the best way to get access to the execstack state,
749 // not execstack() and noexecstack() which are hard to use properly.
35cdfc9a
ILT
750 bool
751 is_execstack_set() const
ee1fe73e 752 { return this->execstack_status_ != EXECSTACK_FROM_INPUT; }
35cdfc9a
ILT
753
754 bool
755 is_stack_executable() const
ee1fe73e 756 { return this->execstack_status_ == EXECSTACK_YES; }
c7912668 757
086a1841
ILT
758 // The --demangle option takes an optional string, and there is also
759 // a --no-demangle option. This is the best way to decide whether
760 // to demangle or not.
761 bool
762 do_demangle() const
763 { return this->do_demangle_; }
764
0864d551
ILT
765 // Whether there are any symbols to wrap.
766 bool
767 any_wrap_symbols() const
768 { return !this->wrap_symbols_.empty(); }
769
770 // Whether to wrap SYMBOL.
771 bool
772 is_wrap_symbol(const char* symbol) const
773 {
774 return (this->wrap_symbols_.find(std::string(symbol))
775 != this->wrap_symbols_.end());
776 }
777
bae7f79e 778 private:
dbe717ef
ILT
779 // Don't copy this structure.
780 General_options(const General_options&);
781 General_options& operator=(const General_options&);
782
35cdfc9a
ILT
783 // Whether to mark the stack as executable.
784 enum Execstack
785 {
786 // Not set on command line.
787 EXECSTACK_FROM_INPUT,
ee1fe73e 788 // Mark the stack as executable (-z execstack).
35cdfc9a 789 EXECSTACK_YES,
ee1fe73e 790 // Mark the stack as not executable (-z noexecstack).
35cdfc9a
ILT
791 EXECSTACK_NO
792 };
793
92e059d8 794 void
ee1fe73e 795 set_execstack_status(Execstack value)
086a1841
ILT
796 { this->execstack_status_ = value; }
797
798 void
799 set_do_demangle(bool value)
800 { this->do_demangle_ = value; }
92e059d8 801
bae7f79e 802 void
45aa233b 803 set_static(bool value)
ee1fe73e 804 { static_ = value; }
652ec9bd 805
ee1fe73e 806 // These are called by finalize() to set up the search-path correctly.
35cdfc9a 807 void
ee1fe73e
ILT
808 add_to_library_path_with_sysroot(const char* arg)
809 { this->add_search_directory_to_library_path(Search_directory(arg, true)); }
c7912668 810
ad2d6943
ILT
811 // Apply any sysroot to the directory lists.
812 void
813 add_sysroot();
086a1841
ILT
814
815 // Whether to mark the stack as executable.
816 Execstack execstack_status_;
817 // Whether to do a static link.
818 bool static_;
819 // Whether to do demangling.
820 bool do_demangle_;
0864d551
ILT
821 // List of symbols used with --wrap.
822 Unordered_set<std::string> wrap_symbols_;
bae7f79e
ILT
823};
824
ee1fe73e
ILT
825// The position-dependent options. We use this to store the state of
826// the commandline at a particular point in parsing for later
827// reference. For instance, if we see "ld --whole-archive foo.a
828// --no-whole-archive," we want to store the whole-archive option with
829// foo.a, so when the time comes to parse foo.a we know we should do
830// it in whole-archive mode. We could store all of General_options,
831// but that's big, so we just pick the subset of flags that actually
832// change in a position-dependent way.
833
834#define DEFINE_posdep(varname__, type__) \
835 public: \
836 type__ \
837 varname__() const \
838 { return this->varname__##_; } \
839 \
840 void \
841 set_##varname__(type__ value) \
842 { this->varname__##_ = value; } \
843 private: \
844 type__ varname__##_
bae7f79e
ILT
845
846class Position_dependent_options
847{
848 public:
ee1fe73e
ILT
849 Position_dependent_options(const General_options& options
850 = Position_dependent_options::default_options_)
851 { copy_from_options(options); }
bae7f79e 852
ee1fe73e
ILT
853 void copy_from_options(const General_options& options)
854 {
855 this->set_as_needed(options.as_needed());
856 this->set_Bdynamic(options.Bdynamic());
857 this->set_format_enum(options.format_enum());
858 this->set_whole_archive(options.whole_archive());
859 }
bc644c6c 860
ee1fe73e
ILT
861 DEFINE_posdep(as_needed, bool);
862 DEFINE_posdep(Bdynamic, bool);
863 DEFINE_posdep(format_enum, General_options::Object_format);
864 DEFINE_posdep(whole_archive, bool);
7cc619c3 865
dbe717ef 866 private:
ee1fe73e
ILT
867 // This is a General_options with everything set to its default
868 // value. A Position_dependent_options created with no argument
869 // will take its values from here.
870 static General_options default_options_;
bae7f79e
ILT
871};
872
ee1fe73e 873
bae7f79e
ILT
874// A single file or library argument from the command line.
875
ead1e424 876class Input_file_argument
bae7f79e
ILT
877{
878 public:
51dee2fe
ILT
879 // name: file name or library name
880 // is_lib: true if name is a library name: that is, emits the leading
881 // "lib" and trailing ".so"/".a" from the name
882 // extra_search_path: an extra directory to look for the file, prior
883 // to checking the normal library search path. If this is "",
884 // then no extra directory is added.
88dd47ac 885 // just_symbols: whether this file only defines symbols.
51dee2fe 886 // options: The position dependent options at this point in the
ad2d6943 887 // command line, such as --whole-archive.
ead1e424 888 Input_file_argument()
88dd47ac
ILT
889 : name_(), is_lib_(false), extra_search_path_(""), just_symbols_(false),
890 options_()
ead1e424
ILT
891 { }
892
893 Input_file_argument(const char* name, bool is_lib,
51dee2fe 894 const char* extra_search_path,
ee1fe73e
ILT
895 bool just_symbols,
896 const Position_dependent_options& options)
897 : name_(name), is_lib_(is_lib), extra_search_path_(extra_search_path),
898 just_symbols_(just_symbols), options_(options)
899 { }
900
901 // You can also pass in a General_options instance instead of a
902 // Position_dependent_options. In that case, we extract the
903 // position-independent vars from the General_options and only store
904 // those.
905 Input_file_argument(const char* name, bool is_lib,
906 const char* extra_search_path,
907 bool just_symbols,
908 const General_options& options)
51dee2fe 909 : name_(name), is_lib_(is_lib), extra_search_path_(extra_search_path),
88dd47ac 910 just_symbols_(just_symbols), options_(options)
bae7f79e
ILT
911 { }
912
913 const char*
914 name() const
dbe717ef 915 { return this->name_.c_str(); }
bae7f79e
ILT
916
917 const Position_dependent_options&
918 options() const
919 { return this->options_; }
920
921 bool
922 is_lib() const
61ba1cf9 923 { return this->is_lib_; }
bae7f79e 924
51dee2fe
ILT
925 const char*
926 extra_search_path() const
927 {
928 return (this->extra_search_path_.empty()
929 ? NULL
ee1fe73e 930 : this->extra_search_path_.c_str());
51dee2fe
ILT
931 }
932
88dd47ac
ILT
933 // Return whether we should only read symbols from this file.
934 bool
935 just_symbols() const
936 { return this->just_symbols_; }
937
51dee2fe
ILT
938 // Return whether this file may require a search using the -L
939 // options.
940 bool
941 may_need_search() const
942 { return this->is_lib_ || !this->extra_search_path_.empty(); }
943
bae7f79e 944 private:
dbe717ef
ILT
945 // We use std::string, not const char*, here for convenience when
946 // using script files, so that we do not have to preserve the string
947 // in that case.
948 std::string name_;
61ba1cf9 949 bool is_lib_;
51dee2fe 950 std::string extra_search_path_;
88dd47ac 951 bool just_symbols_;
bae7f79e
ILT
952 Position_dependent_options options_;
953};
954
ead1e424
ILT
955// A file or library, or a group, from the command line.
956
957class Input_argument
958{
959 public:
960 // Create a file or library argument.
961 explicit Input_argument(Input_file_argument file)
962 : is_file_(true), file_(file), group_(NULL)
963 { }
964
965 // Create a group argument.
966 explicit Input_argument(Input_file_group* group)
967 : is_file_(false), group_(group)
968 { }
969
970 // Return whether this is a file.
971 bool
972 is_file() const
973 { return this->is_file_; }
974
975 // Return whether this is a group.
976 bool
977 is_group() const
978 { return !this->is_file_; }
979
980 // Return the information about the file.
981 const Input_file_argument&
982 file() const
983 {
a3ad94ed 984 gold_assert(this->is_file_);
ead1e424
ILT
985 return this->file_;
986 }
987
988 // Return the information about the group.
989 const Input_file_group*
990 group() const
991 {
a3ad94ed 992 gold_assert(!this->is_file_);
ead1e424
ILT
993 return this->group_;
994 }
995
996 Input_file_group*
997 group()
998 {
a3ad94ed 999 gold_assert(!this->is_file_);
ead1e424
ILT
1000 return this->group_;
1001 }
1002
1003 private:
1004 bool is_file_;
1005 Input_file_argument file_;
1006 Input_file_group* group_;
1007};
1008
1009// A group from the command line. This is a set of arguments within
1010// --start-group ... --end-group.
1011
1012class Input_file_group
92e059d8 1013{
ead1e424
ILT
1014 public:
1015 typedef std::vector<Input_argument> Files;
1016 typedef Files::const_iterator const_iterator;
1017
1018 Input_file_group()
1019 : files_()
1020 { }
1021
1022 // Add a file to the end of the group.
1023 void
1024 add_file(const Input_file_argument& arg)
1025 { this->files_.push_back(Input_argument(arg)); }
1026
1027 // Iterators to iterate over the group contents.
1028
1029 const_iterator
1030 begin() const
1031 { return this->files_.begin(); }
1032
1033 const_iterator
1034 end() const
1035 { return this->files_.end(); }
1036
1037 private:
1038 Files files_;
92e059d8
ILT
1039};
1040
dbe717ef
ILT
1041// A list of files from the command line or a script.
1042
1043class Input_arguments
1044{
1045 public:
1046 typedef std::vector<Input_argument> Input_argument_list;
1047 typedef Input_argument_list::const_iterator const_iterator;
1048
1049 Input_arguments()
1050 : input_argument_list_(), in_group_(false)
1051 { }
1052
1053 // Add a file.
1054 void
1055 add_file(const Input_file_argument& arg);
1056
1057 // Start a group (the --start-group option).
1058 void
1059 start_group();
1060
1061 // End a group (the --end-group option).
1062 void
1063 end_group();
1064
1065 // Return whether we are currently in a group.
1066 bool
1067 in_group() const
1068 { return this->in_group_; }
1069
fe9a4c12
ILT
1070 // The number of entries in the list.
1071 int
1072 size() const
1073 { return this->input_argument_list_.size(); }
1074
dbe717ef
ILT
1075 // Iterators to iterate over the list of input files.
1076
1077 const_iterator
1078 begin() const
1079 { return this->input_argument_list_.begin(); }
1080
1081 const_iterator
1082 end() const
1083 { return this->input_argument_list_.end(); }
1084
1085 // Return whether the list is empty.
1086 bool
1087 empty() const
1088 { return this->input_argument_list_.empty(); }
1089
1090 private:
1091 Input_argument_list input_argument_list_;
1092 bool in_group_;
1093};
1094
ee1fe73e
ILT
1095
1096// All the information read from the command line. These are held in
1097// three separate structs: one to hold the options (--foo), one to
1098// hold the filenames listed on the commandline, and one to hold
1099// linker script information. This third is not a subset of the other
1100// two because linker scripts can be specified either as options (via
1101// -T) or as a file.
bae7f79e
ILT
1102
1103class Command_line
1104{
1105 public:
ead1e424
ILT
1106 typedef Input_arguments::const_iterator const_iterator;
1107
a5dc0706 1108 Command_line();
bae7f79e
ILT
1109
1110 // Process the command line options. This will exit with an
1111 // appropriate error message if an unrecognized option is seen.
1112 void
ee1fe73e 1113 process(int argc, const char** argv);
bae7f79e 1114
a0451b38 1115 // Process one command-line option. This takes the index of argv to
ee1fe73e
ILT
1116 // process, and returns the index for the next option. no_more_options
1117 // is set to true if argv[i] is "--".
61ba1cf9 1118 int
ee1fe73e
ILT
1119 process_one_option(int argc, const char** argv, int i,
1120 bool* no_more_options);
3c2fafa5 1121
61ba1cf9 1122 // Get the general options.
bae7f79e
ILT
1123 const General_options&
1124 options() const
1125 { return this->options_; }
1126
3c2fafa5
ILT
1127 // Get the position dependent options.
1128 const Position_dependent_options&
1129 position_dependent_options() const
1130 { return this->position_options_; }
1131
a5dc0706
ILT
1132 // Get the linker-script options.
1133 Script_options&
e5756efb 1134 script_options()
a5dc0706 1135 { return this->script_options_; }
e5756efb 1136
a5dc0706
ILT
1137 // Get the version-script options: a convenience routine.
1138 const Version_script_info&
1139 version_script() const
1140 { return *this->script_options_.version_script_info(); }
e5756efb 1141
ee1fe73e
ILT
1142 // Get the input files.
1143 Input_arguments&
1144 inputs()
1145 { return this->inputs_; }
1146
fe9a4c12
ILT
1147 // The number of input files.
1148 int
1149 number_of_input_files() const
1150 { return this->inputs_.size(); }
1151
ead1e424
ILT
1152 // Iterators to iterate over the list of input files.
1153
1154 const_iterator
1155 begin() const
1156 { return this->inputs_.begin(); }
1157
1158 const_iterator
1159 end() const
1160 { return this->inputs_.end(); }
bae7f79e
ILT
1161
1162 private:
ead1e424
ILT
1163 Command_line(const Command_line&);
1164 Command_line& operator=(const Command_line&);
1165
bae7f79e
ILT
1166 General_options options_;
1167 Position_dependent_options position_options_;
a5dc0706 1168 Script_options script_options_;
ead1e424 1169 Input_arguments inputs_;
bae7f79e
ILT
1170};
1171
1172} // End namespace gold.
1173
1174#endif // !defined(GOLD_OPTIONS_H)
This page took 0.157811 seconds and 4 git commands to generate.