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