*** empty log message ***
[deliverable/binutils-gdb.git] / gold / options.h
CommitLineData
bae7f79e
ILT
1// options.h -- handle command line options for gold -*- C++ -*-
2
6cb15b7f
ILT
3// Copyright 2006, 2007 Free Software Foundation, Inc.
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
ILT
23// Command_line
24// Holds everything we get from the command line.
25// General_options (from Command_line::options())
26// Options which are not position dependent.
27// Input_argument (from Command_line::inputs())
28// The list of input files, including -l options.
29// Position_dependent_options (from Input_argument::options())
30// Position dependent options which apply to this argument.
31
32#ifndef GOLD_OPTIONS_H
33#define GOLD_OPTIONS_H
34
ca3a67a5 35#include <cstdlib>
bae7f79e 36#include <list>
61ba1cf9 37#include <string>
92e059d8 38#include <vector>
bae7f79e 39
3c2fafa5
ILT
40#include "script.h"
41
bae7f79e
ILT
42namespace gold
43{
44
45class Command_line;
ead1e424 46class Input_file_group;
3c2fafa5 47class Position_dependent_options;
bae7f79e
ILT
48
49namespace options {
50
51class Command_line_options;
52struct One_option;
35cdfc9a 53struct One_z_option;
bae7f79e
ILT
54
55} // End namespace gold::options.
56
ad2d6943
ILT
57// A directory to search. For each directory we record whether it is
58// in the sysroot. We need to know this so that, if a linker script
59// is found within the sysroot, we will apply the sysroot to any files
60// named by that script.
61
62class Search_directory
63{
64 public:
65 // We need a default constructor because we put this in a
66 // std::vector.
67 Search_directory()
68 : name_(NULL), put_in_sysroot_(false), is_in_sysroot_(false)
69 { }
70
71 // This is the usual constructor.
72 Search_directory(const char* name, bool put_in_sysroot)
73 : name_(name), put_in_sysroot_(put_in_sysroot), is_in_sysroot_(false)
74 { gold_assert(!this->name_.empty()); }
75
76 // This is called if we have a sysroot. The sysroot is prefixed to
77 // any entries for which put_in_sysroot_ is true. is_in_sysroot_ is
78 // set to true for any enries which are in the sysroot (this will
79 // naturally include any entries for which put_in_sysroot_ is true).
80 // SYSROOT is the sysroot, CANONICAL_SYSROOT is the result of
81 // passing SYSROOT to lrealpath.
82 void
83 add_sysroot(const char* sysroot, const char* canonical_sysroot);
84
85 // Get the directory name.
86 const std::string&
87 name() const
88 { return this->name_; }
89
90 // Return whether this directory is in the sysroot.
91 bool
92 is_in_sysroot() const
93 { return this->is_in_sysroot_; }
94
95 private:
96 std::string name_;
97 bool put_in_sysroot_;
98 bool is_in_sysroot_;
99};
100
bae7f79e
ILT
101// The position independent options which apply to the whole link.
102// There are a lot of them.
103
104class General_options
105{
106 public:
107 General_options();
108
a6badf5a
ILT
109 // -E: export dynamic symbols.
110 bool
111 export_dynamic() const
112 { return this->export_dynamic_; }
113
dbe717ef
ILT
114 // -I: dynamic linker name.
115 const char*
116 dynamic_linker() const
117 { return this->dynamic_linker_; }
118
bae7f79e 119 // -L: Library search path.
ad2d6943 120 typedef std::vector<Search_directory> Dir_list;
bae7f79e
ILT
121
122 const Dir_list&
123 search_path() const
124 { return this->search_path_; }
125
ca3a67a5
ILT
126 // -O: optimization level (0: don't try to optimize output size).
127 int
128 optimization_level() const
129 { return this->optimization_level_; }
130
61ba1cf9
ILT
131 // -o: Output file name.
132 const char*
133 output_file_name() const
134 { return this->output_file_name_; }
135
bae7f79e
ILT
136 // -r: Whether we are doing a relocatable link.
137 bool
138 is_relocatable() const
139 { return this->is_relocatable_; }
140
9e2dcb77
ILT
141 // -s: Strip all symbols.
142 bool
143 strip_all() const
144 { return this->strip_ == STRIP_ALL; }
145
146 // -S: Strip debugging information.
147 bool
148 strip_debug() const
149 { return this->strip_ == STRIP_ALL || this->strip_ == STRIP_DEBUG; }
150
02d2ba74
ILT
151 // -Sgdb: strip only debugging information that's not used by
152 // gdb (at least, for gdb versions <= 6.7).
153 bool
154 strip_debug_gdb() const
155 { return this->strip_debug() || this->strip_ == STRIP_DEBUG_UNUSED_BY_GDB; }
156
e2827e5f
ILT
157 // --allow-shlib-undefined: do not warn about unresolved symbols in
158 // --shared libraries.
159 bool
160 allow_shlib_undefined() const
161 { return this->allow_shlib_undefined_; }
162
51b08ebe
ILT
163 // -Bsymbolic: bind defined symbols locally.
164 bool
165 symbolic() const
166 { return this->symbolic_; }
167
a2b1aa12
ILT
168 // --demangle: demangle C++ symbols in our log messages.
169 bool
170 demangle() const
171 { return this->demangle_; }
172
a55ce7fe
ILT
173 // --detect-odr-violations: Whether to search for One Defn Rule violations.
174 bool
175 detect_odr_violations() const
176 { return this->detect_odr_violations_; }
177
7da52175
ILT
178 // --eh-frame-hdr: Whether to generate an exception frame header.
179 bool
180 create_eh_frame_hdr() const
181 { return this->create_eh_frame_hdr_; }
182
41f542e7
ILT
183 // --rpath: The runtime search path.
184 const Dir_list&
185 rpath() const
186 { return this->rpath_; }
187
15b3cfae
ILT
188 // --rpath-link: The link time search patch for shared libraries.
189 const Dir_list&
190 rpath_link() const
191 { return this->rpath_link_; }
192
92e059d8
ILT
193 // --shared: Whether generating a shared object.
194 bool
195 is_shared() const
196 { return this->is_shared_; }
197
bae7f79e
ILT
198 // --static: Whether doing a static link.
199 bool
200 is_static() const
201 { return this->is_static_; }
202
0c5e9c22 203 // --stats: Print resource usage statistics.
e44fcf3b
ILT
204 bool
205 print_stats() const
206 { return this->print_stats_; }
207
ad2d6943
ILT
208 // --sysroot: The system root of a cross-linker.
209 const std::string&
210 sysroot() const
211 { return this->sysroot_; }
212
0c5e9c22
ILT
213 // -Ttext: The address of the .text section
214 uint64_t
215 text_segment_address() const
216 { return this->text_segment_address_; }
217
218 // Whether -Ttext was used.
219 bool
220 user_set_text_segment_address() const
221 { return this->text_segment_address_ != -1U; }
222
fe9a4c12
ILT
223 // --threads: Whether to use threads.
224 bool
225 threads() const
226 { return this->threads_; }
227
228 // --thread-count-initial: Threads to use in initial pass.
229 int
230 thread_count_initial() const
231 { return this->thread_count_initial_; }
232
233 // --thread-count-middle: Threads to use in middle pass.
234 int
235 thread_count_middle() const
236 { return this->thread_count_middle_; }
237
238 // --thread-count-final: Threads to use in final pass.
239 int
240 thread_count_final() const
241 { return this->thread_count_final_; }
242
35cdfc9a
ILT
243 // -z execstack, -z noexecstack
244 bool
245 is_execstack_set() const
246 { return this->execstack_ != EXECSTACK_FROM_INPUT; }
247
248 bool
249 is_stack_executable() const
250 { return this->execstack_ == EXECSTACK_YES; }
251
bae7f79e 252 private:
dbe717ef
ILT
253 // Don't copy this structure.
254 General_options(const General_options&);
255 General_options& operator=(const General_options&);
256
bae7f79e
ILT
257 friend class Command_line;
258 friend class options::Command_line_options;
259
9e2dcb77
ILT
260 // Which symbols to strip.
261 enum Strip
262 {
263 // Don't strip any symbols.
264 STRIP_NONE,
265 // Strip all symbols.
266 STRIP_ALL,
267 // Strip debugging information.
02d2ba74
ILT
268 STRIP_DEBUG,
269 // Strip debugging information that's not used by gdb (at least <= 6.7)
270 STRIP_DEBUG_UNUSED_BY_GDB
9e2dcb77
ILT
271 };
272
35cdfc9a
ILT
273 // Whether to mark the stack as executable.
274 enum Execstack
275 {
276 // Not set on command line.
277 EXECSTACK_FROM_INPUT,
278 // Mark the stack as executable.
279 EXECSTACK_YES,
280 // Mark the stack as not executable.
281 EXECSTACK_NO
282 };
283
a6badf5a
ILT
284 void
285 set_export_dynamic()
286 { this->export_dynamic_ = true; }
287
dbe717ef
ILT
288 void
289 set_dynamic_linker(const char* arg)
290 { this->dynamic_linker_ = arg; }
291
bae7f79e
ILT
292 void
293 add_to_search_path(const char* arg)
ad2d6943
ILT
294 { this->search_path_.push_back(Search_directory(arg, false)); }
295
296 void
297 add_to_search_path_with_sysroot(const char* arg)
298 { this->search_path_.push_back(Search_directory(arg, true)); }
bae7f79e 299
ca3a67a5
ILT
300 void
301 set_optimization_level(const char* arg)
302 { this->optimization_level_ = atoi(arg); }
303
61ba1cf9
ILT
304 void
305 set_output_file_name(const char* arg)
306 { this->output_file_name_ = arg; }
307
bae7f79e
ILT
308 void
309 set_relocatable()
310 { this->is_relocatable_ = true; }
311
9e2dcb77
ILT
312 void
313 set_strip_all()
314 { this->strip_ = STRIP_ALL; }
315
46738c9a
ILT
316 // Note: normalize_options() depends on the fact that this turns off
317 // STRIP_ALL if it were already set.
9e2dcb77
ILT
318 void
319 set_strip_debug()
320 { this->strip_ = STRIP_DEBUG; }
321
02d2ba74
ILT
322 void
323 set_strip_debug_gdb()
324 { this->strip_ = STRIP_DEBUG_UNUSED_BY_GDB; }
325
e2827e5f
ILT
326 void
327 set_allow_shlib_undefined()
328 { this->allow_shlib_undefined_ = true; }
329
330 void
331 set_no_allow_shlib_undefined()
332 { this->allow_shlib_undefined_ = false; }
333
51b08ebe
ILT
334 void
335 set_symbolic()
336 { this->symbolic_ = true; }
337
a2b1aa12
ILT
338 void
339 set_demangle()
340 { this->demangle_ = true; }
341
342 void
343 clear_demangle()
344 { this->demangle_ = false; }
345
a55ce7fe
ILT
346 void
347 set_detect_odr_violations()
348 { this->detect_odr_violations_ = true; }
349
7da52175 350 void
192f9b85 351 set_create_eh_frame_hdr()
7da52175
ILT
352 { this->create_eh_frame_hdr_ = true; }
353
41f542e7
ILT
354 void
355 add_to_rpath(const char* arg)
ad2d6943 356 { this->rpath_.push_back(Search_directory(arg, false)); }
41f542e7 357
15b3cfae
ILT
358 void
359 add_to_rpath_link(const char* arg)
ad2d6943 360 { this->rpath_link_.push_back(Search_directory(arg, false)); }
15b3cfae 361
92e059d8
ILT
362 void
363 set_shared()
364 { this->is_shared_ = true; }
365
bae7f79e
ILT
366 void
367 set_static()
368 { this->is_static_ = true; }
369
e44fcf3b
ILT
370 void
371 set_stats()
372 { this->print_stats_ = true; }
373
ad2d6943
ILT
374 void
375 set_sysroot(const char* arg)
376 { this->sysroot_ = arg; }
377
0c5e9c22
ILT
378 void
379 set_text_segment_address(const char* arg)
380 {
381 char* endptr;
382 this->text_segment_address_ = strtoull(arg, &endptr, 0);
383 if (*endptr != '\0'
384 || this->text_segment_address_ == -1U)
385 {
386 fprintf(stderr, _("%s: invalid argument to -Ttext: %s\n"),
387 program_name, arg);
388 ::exit(1);
389 }
390 }
391
fe9a4c12
ILT
392 int
393 parse_thread_count(const char* arg)
394 {
395 char* endptr;
396 int count = strtol(arg, &endptr, 0);
397 if (*endptr != '\0' || count < 0)
398 {
399 fprintf(stderr, _("%s: invalid thread count: %s\n"),
400 program_name, arg);
401 ::exit(1);
402 }
403 return count;
404 }
405
406 void
407 set_threads()
408 { this->threads_ = true; }
409
410 void
411 clear_threads()
412 { this->threads_ = false; }
413
414 void
415 set_thread_count(const char* arg)
416 {
417 int count = this->parse_thread_count(arg);
418 this->thread_count_initial_ = count;
419 this->thread_count_middle_ = count;
420 this->thread_count_final_ = count;
421 }
422
423 void
424 set_thread_count_initial(const char* arg)
425 { this->thread_count_initial_ = this->parse_thread_count(arg); }
426
427 void
428 set_thread_count_middle(const char* arg)
429 { this->thread_count_initial_ = this->parse_thread_count(arg); }
430
431 void
432 set_thread_count_final(const char* arg)
433 { this->thread_count_initial_ = this->parse_thread_count(arg); }
434
652ec9bd
ILT
435 void
436 ignore(const char*)
437 { }
438
35cdfc9a
ILT
439 void
440 set_execstack()
441 { this->execstack_ = EXECSTACK_YES; }
442
443 void
444 set_noexecstack()
445 { this->execstack_ = EXECSTACK_NO; }
446
447 // Handle the -z option.
448 void
449 handle_z_option(const char*);
450
ad2d6943
ILT
451 // Apply any sysroot to the directory lists.
452 void
453 add_sysroot();
454
a6badf5a 455 bool export_dynamic_;
dbe717ef 456 const char* dynamic_linker_;
bae7f79e 457 Dir_list search_path_;
ca3a67a5 458 int optimization_level_;
61ba1cf9 459 const char* output_file_name_;
bae7f79e 460 bool is_relocatable_;
9e2dcb77 461 Strip strip_;
e2827e5f 462 bool allow_shlib_undefined_;
51b08ebe 463 bool symbolic_;
a2b1aa12 464 bool demangle_;
a55ce7fe 465 bool detect_odr_violations_;
7da52175 466 bool create_eh_frame_hdr_;
41f542e7 467 Dir_list rpath_;
15b3cfae 468 Dir_list rpath_link_;
92e059d8 469 bool is_shared_;
bae7f79e 470 bool is_static_;
e44fcf3b 471 bool print_stats_;
ad2d6943 472 std::string sysroot_;
0c5e9c22 473 uint64_t text_segment_address_;
fe9a4c12
ILT
474 bool threads_;
475 int thread_count_initial_;
476 int thread_count_middle_;
477 int thread_count_final_;
35cdfc9a 478 Execstack execstack_;
bae7f79e
ILT
479};
480
481// The current state of the position dependent options.
482
483class Position_dependent_options
484{
485 public:
486 Position_dependent_options();
487
61611222
ILT
488 // -Bdynamic/-Bstatic: Whether we are searching for a static archive
489 // -rather than a shared object.
bae7f79e 490 bool
dbe717ef 491 do_static_search() const
bae7f79e
ILT
492 { return this->do_static_search_; }
493
dbe717ef
ILT
494 // --as-needed: Whether to add a DT_NEEDED argument only if the
495 // dynamic object is used.
496 bool
497 as_needed() const
498 { return this->as_needed_; }
bae7f79e 499
4973341a
ILT
500 // --whole-archive: Whether to include the entire contents of an
501 // --archive.
502 bool
503 include_whole_archive() const
504 { return this->include_whole_archive_; }
505
bae7f79e
ILT
506 void
507 set_static_search()
508 { this->do_static_search_ = true; }
509
510 void
511 set_dynamic_search()
512 { this->do_static_search_ = false; }
513
dbe717ef
ILT
514 void
515 set_as_needed()
516 { this->as_needed_ = true; }
517
518 void
519 clear_as_needed()
520 { this->as_needed_ = false; }
521
4973341a
ILT
522 void
523 set_whole_archive()
524 { this->include_whole_archive_ = true; }
525
526 void
527 clear_whole_archive()
528 { this->include_whole_archive_ = false; }
529
dbe717ef 530 private:
bae7f79e 531 bool do_static_search_;
dbe717ef 532 bool as_needed_;
4973341a 533 bool include_whole_archive_;
bae7f79e
ILT
534};
535
536// A single file or library argument from the command line.
537
ead1e424 538class Input_file_argument
bae7f79e
ILT
539{
540 public:
51dee2fe
ILT
541 // name: file name or library name
542 // is_lib: true if name is a library name: that is, emits the leading
543 // "lib" and trailing ".so"/".a" from the name
544 // extra_search_path: an extra directory to look for the file, prior
545 // to checking the normal library search path. If this is "",
546 // then no extra directory is added.
547 // options: The position dependent options at this point in the
ad2d6943 548 // command line, such as --whole-archive.
ead1e424 549 Input_file_argument()
51dee2fe 550 : name_(), is_lib_(false), extra_search_path_(""), options_()
ead1e424
ILT
551 { }
552
553 Input_file_argument(const char* name, bool is_lib,
51dee2fe 554 const char* extra_search_path,
ead1e424 555 const Position_dependent_options& options)
51dee2fe
ILT
556 : name_(name), is_lib_(is_lib), extra_search_path_(extra_search_path),
557 options_(options)
bae7f79e
ILT
558 { }
559
560 const char*
561 name() const
dbe717ef 562 { return this->name_.c_str(); }
bae7f79e
ILT
563
564 const Position_dependent_options&
565 options() const
566 { return this->options_; }
567
568 bool
569 is_lib() const
61ba1cf9 570 { return this->is_lib_; }
bae7f79e 571
51dee2fe
ILT
572 const char*
573 extra_search_path() const
574 {
575 return (this->extra_search_path_.empty()
576 ? NULL
577 : this->extra_search_path_.c_str());
578 }
579
580 // Return whether this file may require a search using the -L
581 // options.
582 bool
583 may_need_search() const
584 { return this->is_lib_ || !this->extra_search_path_.empty(); }
585
bae7f79e 586 private:
dbe717ef
ILT
587 // We use std::string, not const char*, here for convenience when
588 // using script files, so that we do not have to preserve the string
589 // in that case.
590 std::string name_;
61ba1cf9 591 bool is_lib_;
51dee2fe 592 std::string extra_search_path_;
bae7f79e
ILT
593 Position_dependent_options options_;
594};
595
ead1e424
ILT
596// A file or library, or a group, from the command line.
597
598class Input_argument
599{
600 public:
601 // Create a file or library argument.
602 explicit Input_argument(Input_file_argument file)
603 : is_file_(true), file_(file), group_(NULL)
604 { }
605
606 // Create a group argument.
607 explicit Input_argument(Input_file_group* group)
608 : is_file_(false), group_(group)
609 { }
610
611 // Return whether this is a file.
612 bool
613 is_file() const
614 { return this->is_file_; }
615
616 // Return whether this is a group.
617 bool
618 is_group() const
619 { return !this->is_file_; }
620
621 // Return the information about the file.
622 const Input_file_argument&
623 file() const
624 {
a3ad94ed 625 gold_assert(this->is_file_);
ead1e424
ILT
626 return this->file_;
627 }
628
629 // Return the information about the group.
630 const Input_file_group*
631 group() const
632 {
a3ad94ed 633 gold_assert(!this->is_file_);
ead1e424
ILT
634 return this->group_;
635 }
636
637 Input_file_group*
638 group()
639 {
a3ad94ed 640 gold_assert(!this->is_file_);
ead1e424
ILT
641 return this->group_;
642 }
643
644 private:
645 bool is_file_;
646 Input_file_argument file_;
647 Input_file_group* group_;
648};
649
650// A group from the command line. This is a set of arguments within
651// --start-group ... --end-group.
652
653class Input_file_group
92e059d8 654{
ead1e424
ILT
655 public:
656 typedef std::vector<Input_argument> Files;
657 typedef Files::const_iterator const_iterator;
658
659 Input_file_group()
660 : files_()
661 { }
662
663 // Add a file to the end of the group.
664 void
665 add_file(const Input_file_argument& arg)
666 { this->files_.push_back(Input_argument(arg)); }
667
668 // Iterators to iterate over the group contents.
669
670 const_iterator
671 begin() const
672 { return this->files_.begin(); }
673
674 const_iterator
675 end() const
676 { return this->files_.end(); }
677
678 private:
679 Files files_;
92e059d8
ILT
680};
681
dbe717ef
ILT
682// A list of files from the command line or a script.
683
684class Input_arguments
685{
686 public:
687 typedef std::vector<Input_argument> Input_argument_list;
688 typedef Input_argument_list::const_iterator const_iterator;
689
690 Input_arguments()
691 : input_argument_list_(), in_group_(false)
692 { }
693
694 // Add a file.
695 void
696 add_file(const Input_file_argument& arg);
697
698 // Start a group (the --start-group option).
699 void
700 start_group();
701
702 // End a group (the --end-group option).
703 void
704 end_group();
705
706 // Return whether we are currently in a group.
707 bool
708 in_group() const
709 { return this->in_group_; }
710
fe9a4c12
ILT
711 // The number of entries in the list.
712 int
713 size() const
714 { return this->input_argument_list_.size(); }
715
dbe717ef
ILT
716 // Iterators to iterate over the list of input files.
717
718 const_iterator
719 begin() const
720 { return this->input_argument_list_.begin(); }
721
722 const_iterator
723 end() const
724 { return this->input_argument_list_.end(); }
725
726 // Return whether the list is empty.
727 bool
728 empty() const
729 { return this->input_argument_list_.empty(); }
730
731 private:
732 Input_argument_list input_argument_list_;
733 bool in_group_;
734};
735
bae7f79e
ILT
736// All the information read from the command line.
737
738class Command_line
739{
740 public:
ead1e424
ILT
741 typedef Input_arguments::const_iterator const_iterator;
742
bae7f79e
ILT
743 Command_line();
744
745 // Process the command line options. This will exit with an
746 // appropriate error message if an unrecognized option is seen.
747 void
748 process(int argc, char** argv);
749
a0451b38
ILT
750 // Process one command-line option. This takes the index of argv to
751 // process, and returns the index for the next option.
752 int
753 process_one_option(int argc, char** argv, int i, bool* no_more_options);
754
61ba1cf9
ILT
755 // Handle a -l option.
756 int
3c2fafa5 757 process_l_option(int, char**, char*, bool);
61ba1cf9 758
ead1e424
ILT
759 // Handle a --start-group option.
760 void
761 start_group(const char* arg);
762
763 // Handle a --end-group option.
764 void
765 end_group(const char* arg);
766
3c2fafa5
ILT
767 // Get an option argument--a helper function for special processing.
768 const char*
769 get_special_argument(const char* longname, int argc, char** argv,
770 const char* arg, bool long_option,
771 int *pret);
772
61ba1cf9 773 // Get the general options.
bae7f79e
ILT
774 const General_options&
775 options() const
776 { return this->options_; }
777
3c2fafa5
ILT
778 // Get the position dependent options.
779 const Position_dependent_options&
780 position_dependent_options() const
781 { return this->position_options_; }
782
fe9a4c12
ILT
783 // The number of input files.
784 int
785 number_of_input_files() const
786 { return this->inputs_.size(); }
787
ead1e424
ILT
788 // Iterators to iterate over the list of input files.
789
790 const_iterator
791 begin() const
792 { return this->inputs_.begin(); }
793
794 const_iterator
795 end() const
796 { return this->inputs_.end(); }
bae7f79e
ILT
797
798 private:
ead1e424
ILT
799 Command_line(const Command_line&);
800 Command_line& operator=(const Command_line&);
801
802 // Report usage error.
803 void
804 usage() ATTRIBUTE_NORETURN;
805 void
806 usage(const char* msg, const char* opt) ATTRIBUTE_NORETURN;
807 void
808 usage(const char* msg, char opt) ATTRIBUTE_NORETURN;
809
810 // Apply a command line option.
811 void
812 apply_option(const gold::options::One_option&, const char*);
813
814 // Add a file.
815 void
816 add_file(const char* name, bool is_lib);
bae7f79e 817
46738c9a
ILT
818 // Examine the result of processing the command-line, and verify
819 // the flags do not contradict each other or are otherwise illegal.
820 void
821 normalize_options();
822
bae7f79e
ILT
823 General_options options_;
824 Position_dependent_options position_options_;
ead1e424 825 Input_arguments inputs_;
bae7f79e
ILT
826};
827
828} // End namespace gold.
829
830#endif // !defined(GOLD_OPTIONS_H)
This page took 0.102927 seconds and 4 git commands to generate.