xref: /netbsd-src/external/gpl3/binutils/dist/ld/ldgram.h (revision eceb233b9bd0dfebb902ed73b531ae6964fa3f9b)
1 /* A Bison parser, made by GNU Bison 3.0.5.  */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6 
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
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
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19 
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29 
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32 
33 #ifndef YY_YY_LDGRAM_H_INCLUDED
34 # define YY_YY_LDGRAM_H_INCLUDED
35 /* Debug traces.  */
36 #ifndef YYDEBUG
37 # define YYDEBUG 0
38 #endif
39 #if YYDEBUG
40 extern int yydebug;
41 #endif
42 
43 /* Token type.  */
44 #ifndef YYTOKENTYPE
45 # define YYTOKENTYPE
46   enum yytokentype
47   {
48     INT = 258,
49     NAME = 259,
50     LNAME = 260,
51     PLUSEQ = 261,
52     MINUSEQ = 262,
53     MULTEQ = 263,
54     DIVEQ = 264,
55     LSHIFTEQ = 265,
56     RSHIFTEQ = 266,
57     ANDEQ = 267,
58     OREQ = 268,
59     OROR = 269,
60     ANDAND = 270,
61     EQ = 271,
62     NE = 272,
63     LE = 273,
64     GE = 274,
65     LSHIFT = 275,
66     RSHIFT = 276,
67     UNARY = 277,
68     END = 278,
69     ALIGN_K = 279,
70     BLOCK = 280,
71     BIND = 281,
72     QUAD = 282,
73     SQUAD = 283,
74     LONG = 284,
75     SHORT = 285,
76     BYTE = 286,
77     SECTIONS = 287,
78     PHDRS = 288,
79     INSERT_K = 289,
80     AFTER = 290,
81     BEFORE = 291,
82     DATA_SEGMENT_ALIGN = 292,
83     DATA_SEGMENT_RELRO_END = 293,
84     DATA_SEGMENT_END = 294,
85     SORT_BY_NAME = 295,
86     SORT_BY_ALIGNMENT = 296,
87     SORT_NONE = 297,
88     SORT_BY_INIT_PRIORITY = 298,
89     SIZEOF_HEADERS = 299,
90     OUTPUT_FORMAT = 300,
91     FORCE_COMMON_ALLOCATION = 301,
92     OUTPUT_ARCH = 302,
93     INHIBIT_COMMON_ALLOCATION = 303,
94     FORCE_GROUP_ALLOCATION = 304,
95     SEGMENT_START = 305,
96     INCLUDE = 306,
97     MEMORY = 307,
98     REGION_ALIAS = 308,
99     LD_FEATURE = 309,
100     NOLOAD = 310,
101     DSECT = 311,
102     COPY = 312,
103     INFO = 313,
104     OVERLAY = 314,
105     DEFINED = 315,
106     TARGET_K = 316,
107     SEARCH_DIR = 317,
108     MAP = 318,
109     ENTRY = 319,
110     NEXT = 320,
111     SIZEOF = 321,
112     ALIGNOF = 322,
113     ADDR = 323,
114     LOADADDR = 324,
115     MAX_K = 325,
116     MIN_K = 326,
117     STARTUP = 327,
118     HLL = 328,
119     SYSLIB = 329,
120     FLOAT = 330,
121     NOFLOAT = 331,
122     NOCROSSREFS = 332,
123     NOCROSSREFS_TO = 333,
124     ORIGIN = 334,
125     FILL = 335,
126     LENGTH = 336,
127     CREATE_OBJECT_SYMBOLS = 337,
128     INPUT = 338,
129     GROUP = 339,
130     OUTPUT = 340,
131     CONSTRUCTORS = 341,
132     ALIGNMOD = 342,
133     AT = 343,
134     SUBALIGN = 344,
135     HIDDEN = 345,
136     PROVIDE = 346,
137     PROVIDE_HIDDEN = 347,
138     AS_NEEDED = 348,
139     CHIP = 349,
140     LIST = 350,
141     SECT = 351,
142     ABSOLUTE = 352,
143     LOAD = 353,
144     NEWLINE = 354,
145     ENDWORD = 355,
146     ORDER = 356,
147     NAMEWORD = 357,
148     ASSERT_K = 358,
149     LOG2CEIL = 359,
150     FORMAT = 360,
151     PUBLIC = 361,
152     DEFSYMEND = 362,
153     BASE = 363,
154     ALIAS = 364,
155     TRUNCATE = 365,
156     REL = 366,
157     INPUT_SCRIPT = 367,
158     INPUT_MRI_SCRIPT = 368,
159     INPUT_DEFSYM = 369,
160     CASE = 370,
161     EXTERN = 371,
162     START = 372,
163     VERS_TAG = 373,
164     VERS_IDENTIFIER = 374,
165     GLOBAL = 375,
166     LOCAL = 376,
167     VERSIONK = 377,
168     INPUT_VERSION_SCRIPT = 378,
169     KEEP = 379,
170     ONLY_IF_RO = 380,
171     ONLY_IF_RW = 381,
172     SPECIAL = 382,
173     INPUT_SECTION_FLAGS = 383,
174     ALIGN_WITH_INPUT = 384,
175     EXCLUDE_FILE = 385,
176     CONSTANT = 386,
177     INPUT_DYNAMIC_LIST = 387
178   };
179 #endif
180 /* Tokens.  */
181 #define INT 258
182 #define NAME 259
183 #define LNAME 260
184 #define PLUSEQ 261
185 #define MINUSEQ 262
186 #define MULTEQ 263
187 #define DIVEQ 264
188 #define LSHIFTEQ 265
189 #define RSHIFTEQ 266
190 #define ANDEQ 267
191 #define OREQ 268
192 #define OROR 269
193 #define ANDAND 270
194 #define EQ 271
195 #define NE 272
196 #define LE 273
197 #define GE 274
198 #define LSHIFT 275
199 #define RSHIFT 276
200 #define UNARY 277
201 #define END 278
202 #define ALIGN_K 279
203 #define BLOCK 280
204 #define BIND 281
205 #define QUAD 282
206 #define SQUAD 283
207 #define LONG 284
208 #define SHORT 285
209 #define BYTE 286
210 #define SECTIONS 287
211 #define PHDRS 288
212 #define INSERT_K 289
213 #define AFTER 290
214 #define BEFORE 291
215 #define DATA_SEGMENT_ALIGN 292
216 #define DATA_SEGMENT_RELRO_END 293
217 #define DATA_SEGMENT_END 294
218 #define SORT_BY_NAME 295
219 #define SORT_BY_ALIGNMENT 296
220 #define SORT_NONE 297
221 #define SORT_BY_INIT_PRIORITY 298
222 #define SIZEOF_HEADERS 299
223 #define OUTPUT_FORMAT 300
224 #define FORCE_COMMON_ALLOCATION 301
225 #define OUTPUT_ARCH 302
226 #define INHIBIT_COMMON_ALLOCATION 303
227 #define FORCE_GROUP_ALLOCATION 304
228 #define SEGMENT_START 305
229 #define INCLUDE 306
230 #define MEMORY 307
231 #define REGION_ALIAS 308
232 #define LD_FEATURE 309
233 #define NOLOAD 310
234 #define DSECT 311
235 #define COPY 312
236 #define INFO 313
237 #define OVERLAY 314
238 #define DEFINED 315
239 #define TARGET_K 316
240 #define SEARCH_DIR 317
241 #define MAP 318
242 #define ENTRY 319
243 #define NEXT 320
244 #define SIZEOF 321
245 #define ALIGNOF 322
246 #define ADDR 323
247 #define LOADADDR 324
248 #define MAX_K 325
249 #define MIN_K 326
250 #define STARTUP 327
251 #define HLL 328
252 #define SYSLIB 329
253 #define FLOAT 330
254 #define NOFLOAT 331
255 #define NOCROSSREFS 332
256 #define NOCROSSREFS_TO 333
257 #define ORIGIN 334
258 #define FILL 335
259 #define LENGTH 336
260 #define CREATE_OBJECT_SYMBOLS 337
261 #define INPUT 338
262 #define GROUP 339
263 #define OUTPUT 340
264 #define CONSTRUCTORS 341
265 #define ALIGNMOD 342
266 #define AT 343
267 #define SUBALIGN 344
268 #define HIDDEN 345
269 #define PROVIDE 346
270 #define PROVIDE_HIDDEN 347
271 #define AS_NEEDED 348
272 #define CHIP 349
273 #define LIST 350
274 #define SECT 351
275 #define ABSOLUTE 352
276 #define LOAD 353
277 #define NEWLINE 354
278 #define ENDWORD 355
279 #define ORDER 356
280 #define NAMEWORD 357
281 #define ASSERT_K 358
282 #define LOG2CEIL 359
283 #define FORMAT 360
284 #define PUBLIC 361
285 #define DEFSYMEND 362
286 #define BASE 363
287 #define ALIAS 364
288 #define TRUNCATE 365
289 #define REL 366
290 #define INPUT_SCRIPT 367
291 #define INPUT_MRI_SCRIPT 368
292 #define INPUT_DEFSYM 369
293 #define CASE 370
294 #define EXTERN 371
295 #define START 372
296 #define VERS_TAG 373
297 #define VERS_IDENTIFIER 374
298 #define GLOBAL 375
299 #define LOCAL 376
300 #define VERSIONK 377
301 #define INPUT_VERSION_SCRIPT 378
302 #define KEEP 379
303 #define ONLY_IF_RO 380
304 #define ONLY_IF_RW 381
305 #define SPECIAL 382
306 #define INPUT_SECTION_FLAGS 383
307 #define ALIGN_WITH_INPUT 384
308 #define EXCLUDE_FILE 385
309 #define CONSTANT 386
310 #define INPUT_DYNAMIC_LIST 387
311 
312 /* Value type.  */
313 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
314 
315 union YYSTYPE
316 {
317 #line 61 "ldgram.y" /* yacc.c:1910  */
318 
319   bfd_vma integer;
320   struct big_int
321     {
322       bfd_vma integer;
323       char *str;
324     } bigint;
325   fill_type *fill;
326   char *name;
327   const char *cname;
328   struct wildcard_spec wildcard;
329   struct wildcard_list *wildcard_list;
330   struct name_list *name_list;
331   struct flag_info_list *flag_info_list;
332   struct flag_info *flag_info;
333   int token;
334   union etree_union *etree;
335   struct phdr_info
336     {
337       bfd_boolean filehdr;
338       bfd_boolean phdrs;
339       union etree_union *at;
340       union etree_union *flags;
341     } phdr;
342   struct lang_nocrossref *nocrossref;
343   struct lang_output_section_phdr_list *section_phdr;
344   struct bfd_elf_version_deps *deflist;
345   struct bfd_elf_version_expr *versyms;
346   struct bfd_elf_version_tree *versnode;
347 
348 #line 349 "ldgram.h" /* yacc.c:1910  */
349 };
350 
351 typedef union YYSTYPE YYSTYPE;
352 # define YYSTYPE_IS_TRIVIAL 1
353 # define YYSTYPE_IS_DECLARED 1
354 #endif
355 
356 
357 extern YYSTYPE yylval;
358 
359 int yyparse (void);
360 
361 #endif /* !YY_YY_LDGRAM_H_INCLUDED  */
362