Make assignments to dot keep an empty output section.
[deliverable/binutils-gdb.git] / ld / ldlex.h
CommitLineData
252b5132 1/* ldlex.h -
dab69f68
AM
2 Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2000, 2003, 2005, 2006,
3 2007, 2012 Free Software Foundation, Inc.
252b5132 4
f96b4a7b 5 This file is part of the GNU Binutils.
252b5132 6
f96b4a7b 7 This program is free software; you can redistribute it and/or modify
252b5132 8 it under the terms of the GNU General Public License as published by
f96b4a7b
NC
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
252b5132 11
f96b4a7b 12 This program is distributed in the hope that it will be useful,
252b5132
RH
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
f96b4a7b
NC
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
252b5132
RH
21
22#ifndef LDLEX_H
23#define LDLEX_H
24
25#include <stdio.h>
26
f05eb3b7
AM
27/* Codes used for the long options with no short synonyms. 150 isn't
28 special; it's just an arbitrary non-ASCII char value. */
29enum option_values
30{
31 OPTION_ASSERT = 150,
32 OPTION_CALL_SHARED,
33 OPTION_CREF,
34 OPTION_DEFSYM,
35 OPTION_DEMANGLE,
36 OPTION_DYNAMIC_LINKER,
37 OPTION_SYSROOT,
38 OPTION_EB,
39 OPTION_EL,
40 OPTION_EMBEDDED_RELOCS,
41 OPTION_EXPORT_DYNAMIC,
42 OPTION_NO_EXPORT_DYNAMIC,
43 OPTION_HELP,
44 OPTION_IGNORE,
45 OPTION_MAP,
46 OPTION_NO_DEMANGLE,
47 OPTION_NO_KEEP_MEMORY,
48 OPTION_NO_WARN_MISMATCH,
49 OPTION_NO_WARN_SEARCH_MISMATCH,
50 OPTION_NOINHIBIT_EXEC,
51 OPTION_NON_SHARED,
52 OPTION_NO_WHOLE_ARCHIVE,
53 OPTION_OFORMAT,
54 OPTION_RELAX,
55 OPTION_NO_RELAX,
56 OPTION_RETAIN_SYMBOLS_FILE,
57 OPTION_RPATH,
58 OPTION_RPATH_LINK,
59 OPTION_SHARED,
60 OPTION_SONAME,
61 OPTION_SORT_COMMON,
62 OPTION_SORT_SECTION,
63 OPTION_STATS,
64 OPTION_SYMBOLIC,
65 OPTION_SYMBOLIC_FUNCTIONS,
66 OPTION_TASK_LINK,
67 OPTION_TBSS,
68 OPTION_TDATA,
69 OPTION_TTEXT,
70 OPTION_TTEXT_SEGMENT,
9d5777a3 71 OPTION_TRODATA_SEGMENT,
0d705e9f 72 OPTION_TLDATA_SEGMENT,
f05eb3b7
AM
73 OPTION_TRADITIONAL_FORMAT,
74 OPTION_UR,
75 OPTION_VERBOSE,
76 OPTION_VERSION,
77 OPTION_VERSION_SCRIPT,
78 OPTION_VERSION_EXPORTS_SECTION,
79 OPTION_DYNAMIC_LIST,
80 OPTION_DYNAMIC_LIST_CPP_NEW,
81 OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
82 OPTION_DYNAMIC_LIST_DATA,
83 OPTION_WARN_COMMON,
84 OPTION_WARN_CONSTRUCTORS,
85 OPTION_WARN_FATAL,
86 OPTION_NO_WARN_FATAL,
87 OPTION_WARN_MULTIPLE_GP,
88 OPTION_WARN_ONCE,
89 OPTION_WARN_SECTION_ALIGN,
90 OPTION_SPLIT_BY_RELOC,
91 OPTION_SPLIT_BY_FILE ,
92 OPTION_WHOLE_ARCHIVE,
93 OPTION_ADD_DT_NEEDED_FOR_DYNAMIC,
94 OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC,
95 OPTION_ADD_DT_NEEDED_FOR_REGULAR,
96 OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR,
97 OPTION_WRAP,
98 OPTION_FORCE_EXE_SUFFIX,
99 OPTION_GC_SECTIONS,
100 OPTION_NO_GC_SECTIONS,
101 OPTION_PRINT_GC_SECTIONS,
102 OPTION_NO_PRINT_GC_SECTIONS,
103 OPTION_HASH_SIZE,
104 OPTION_CHECK_SECTIONS,
105 OPTION_NO_CHECK_SECTIONS,
106 OPTION_NO_UNDEFINED,
107 OPTION_INIT,
108 OPTION_FINI,
109 OPTION_SECTION_START,
110 OPTION_UNIQUE,
111 OPTION_TARGET_HELP,
112 OPTION_ALLOW_SHLIB_UNDEFINED,
113 OPTION_NO_ALLOW_SHLIB_UNDEFINED,
114 OPTION_ALLOW_MULTIPLE_DEFINITION,
115 OPTION_NO_UNDEFINED_VERSION,
116 OPTION_DEFAULT_SYMVER,
117 OPTION_DEFAULT_IMPORTED_SYMVER,
118 OPTION_DISCARD_NONE,
119 OPTION_SPARE_DYNAMIC_TAGS,
120 OPTION_NO_DEFINE_COMMON,
121 OPTION_NOSTDLIB,
122 OPTION_NO_OMAGIC,
123 OPTION_STRIP_DISCARDED,
124 OPTION_NO_STRIP_DISCARDED,
125 OPTION_ACCEPT_UNKNOWN_INPUT_ARCH,
126 OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH,
127 OPTION_PIE,
128 OPTION_UNRESOLVED_SYMBOLS,
129 OPTION_WARN_UNRESOLVED_SYMBOLS,
130 OPTION_ERROR_UNRESOLVED_SYMBOLS,
131 OPTION_WARN_SHARED_TEXTREL,
132 OPTION_WARN_ALTERNATE_EM,
133 OPTION_REDUCE_MEMORY_OVERHEADS,
134#ifdef ENABLE_PLUGINS
135 OPTION_PLUGIN,
136 OPTION_PLUGIN_OPT,
137#endif /* ENABLE_PLUGINS */
138 OPTION_DEFAULT_SCRIPT,
139 OPTION_PRINT_OUTPUT_FORMAT,
0e86e20e 140 OPTION_IGNORE_UNRESOLVED_SYMBOL,
f05eb3b7
AM
141};
142
252b5132
RH
143/* The initial parser states. */
144typedef enum input_enum {
145 input_selected, /* We've set the initial state. */
146 input_script,
147 input_mri_script,
148 input_version_script,
55255dae 149 input_dynamic_list,
252b5132
RH
150 input_defsym
151} input_type;
152
153extern input_type parser_input;
154
155extern unsigned int lineno;
156extern const char *lex_string;
157
158/* In ldlex.l. */
1579bae1 159extern int yylex (void);
f4a23d42 160extern void lex_push_file (FILE *, const char *, unsigned int);
dab69f68 161extern void lex_redirect (const char *, const char *, unsigned int);
1579bae1
AM
162extern void ldlex_script (void);
163extern void ldlex_mri_script (void);
164extern void ldlex_version_script (void);
165extern void ldlex_version_file (void);
166extern void ldlex_defsym (void);
167extern void ldlex_expression (void);
168extern void ldlex_both (void);
169extern void ldlex_command (void);
170extern void ldlex_popstate (void);
dab69f68 171extern const char* ldlex_filename (void);
252b5132
RH
172
173/* In lexsup.c. */
1579bae1
AM
174extern int lex_input (void);
175extern void lex_unput (int);
252b5132 176#ifndef yywrap
1579bae1 177extern int yywrap (void);
252b5132 178#endif
1579bae1 179extern void parse_args (unsigned, char **);
252b5132
RH
180
181#endif
This page took 0.559977 seconds and 4 git commands to generate.