2 Copyright (C) 1991-2014 Free Software Foundation, Inc.
4 This file is part of the GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program 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.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
26 /* Codes used for the long options with no short synonyms. 150 isn't
27 special; it's just an arbitrary non-ASCII char value. */
35 OPTION_DYNAMIC_LINKER
,
39 OPTION_EMBEDDED_RELOCS
,
40 OPTION_EXPORT_DYNAMIC
,
41 OPTION_NO_EXPORT_DYNAMIC
,
46 OPTION_NO_KEEP_MEMORY
,
47 OPTION_NO_WARN_MISMATCH
,
48 OPTION_NO_WARN_SEARCH_MISMATCH
,
49 OPTION_NOINHIBIT_EXEC
,
51 OPTION_NO_WHOLE_ARCHIVE
,
55 OPTION_RETAIN_SYMBOLS_FILE
,
64 OPTION_SYMBOLIC_FUNCTIONS
,
70 OPTION_TRODATA_SEGMENT
,
71 OPTION_TLDATA_SEGMENT
,
72 OPTION_TRADITIONAL_FORMAT
,
76 OPTION_VERSION_SCRIPT
,
77 OPTION_VERSION_EXPORTS_SECTION
,
79 OPTION_DYNAMIC_LIST_CPP_NEW
,
80 OPTION_DYNAMIC_LIST_CPP_TYPEINFO
,
81 OPTION_DYNAMIC_LIST_DATA
,
83 OPTION_WARN_CONSTRUCTORS
,
86 OPTION_WARN_MULTIPLE_GP
,
88 OPTION_WARN_SECTION_ALIGN
,
89 OPTION_SPLIT_BY_RELOC
,
90 OPTION_SPLIT_BY_FILE
,
92 OPTION_ADD_DT_NEEDED_FOR_DYNAMIC
,
93 OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC
,
94 OPTION_ADD_DT_NEEDED_FOR_REGULAR
,
95 OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR
,
97 OPTION_FORCE_EXE_SUFFIX
,
99 OPTION_NO_GC_SECTIONS
,
100 OPTION_PRINT_GC_SECTIONS
,
101 OPTION_NO_PRINT_GC_SECTIONS
,
103 OPTION_CHECK_SECTIONS
,
104 OPTION_NO_CHECK_SECTIONS
,
108 OPTION_SECTION_START
,
111 OPTION_ALLOW_SHLIB_UNDEFINED
,
112 OPTION_NO_ALLOW_SHLIB_UNDEFINED
,
113 OPTION_ALLOW_MULTIPLE_DEFINITION
,
114 OPTION_NO_UNDEFINED_VERSION
,
115 OPTION_DEFAULT_SYMVER
,
116 OPTION_DEFAULT_IMPORTED_SYMVER
,
118 OPTION_SPARE_DYNAMIC_TAGS
,
119 OPTION_NO_DEFINE_COMMON
,
122 OPTION_STRIP_DISCARDED
,
123 OPTION_NO_STRIP_DISCARDED
,
124 OPTION_ACCEPT_UNKNOWN_INPUT_ARCH
,
125 OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH
,
127 OPTION_UNRESOLVED_SYMBOLS
,
128 OPTION_WARN_UNRESOLVED_SYMBOLS
,
129 OPTION_ERROR_UNRESOLVED_SYMBOLS
,
130 OPTION_WARN_SHARED_TEXTREL
,
131 OPTION_WARN_ALTERNATE_EM
,
132 OPTION_REDUCE_MEMORY_OVERHEADS
,
133 #ifdef ENABLE_PLUGINS
136 #endif /* ENABLE_PLUGINS */
137 OPTION_DEFAULT_SCRIPT
,
138 OPTION_PRINT_OUTPUT_FORMAT
,
139 OPTION_IGNORE_UNRESOLVED_SYMBOL
,
142 /* The initial parser states. */
143 typedef enum input_enum
{
144 input_selected
, /* We've set the initial state. */
147 input_version_script
,
152 extern input_type parser_input
;
154 extern unsigned int lineno
;
155 extern const char *lex_string
;
158 extern int yylex (void);
159 extern void lex_push_file (FILE *, const char *, unsigned int);
160 extern void lex_redirect (const char *, const char *, unsigned int);
161 extern void ldlex_script (void);
162 extern void ldlex_mri_script (void);
163 extern void ldlex_version_script (void);
164 extern void ldlex_version_file (void);
165 extern void ldlex_defsym (void);
166 extern void ldlex_expression (void);
167 extern void ldlex_both (void);
168 extern void ldlex_command (void);
169 extern void ldlex_popstate (void);
170 extern const char* ldlex_filename (void);
173 extern int lex_input (void);
174 extern void lex_unput (int);
176 extern int yywrap (void);
178 extern void parse_args (unsigned, char **);