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