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_YYSCRIPT_H_INCLUDED 34 # define YY_YY_YYSCRIPT_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 PLUSEQ = 258, 49 MINUSEQ = 259, 50 MULTEQ = 260, 51 DIVEQ = 261, 52 LSHIFTEQ = 262, 53 RSHIFTEQ = 263, 54 ANDEQ = 264, 55 OREQ = 265, 56 OROR = 266, 57 ANDAND = 267, 58 EQ = 268, 59 NE = 269, 60 LE = 270, 61 GE = 271, 62 LSHIFT = 272, 63 RSHIFT = 273, 64 UNARY = 274, 65 STRING = 275, 66 QUOTED_STRING = 276, 67 INTEGER = 277, 68 ABSOLUTE = 278, 69 ADDR = 279, 70 ALIGN_K = 280, 71 ALIGNOF = 281, 72 ASSERT_K = 282, 73 AS_NEEDED = 283, 74 AT = 284, 75 BIND = 285, 76 BLOCK = 286, 77 BYTE = 287, 78 CONSTANT = 288, 79 CONSTRUCTORS = 289, 80 COPY = 290, 81 CREATE_OBJECT_SYMBOLS = 291, 82 DATA_SEGMENT_ALIGN = 292, 83 DATA_SEGMENT_END = 293, 84 DATA_SEGMENT_RELRO_END = 294, 85 DEFINED = 295, 86 DSECT = 296, 87 ENTRY = 297, 88 EXCLUDE_FILE = 298, 89 EXTERN = 299, 90 FILL = 300, 91 FLOAT = 301, 92 FORCE_COMMON_ALLOCATION = 302, 93 GLOBAL = 303, 94 GROUP = 304, 95 HIDDEN = 305, 96 HLL = 306, 97 INCLUDE = 307, 98 INHIBIT_COMMON_ALLOCATION = 308, 99 INFO = 309, 100 INPUT = 310, 101 KEEP = 311, 102 LEN = 312, 103 LENGTH = 313, 104 LOADADDR = 314, 105 LOCAL = 315, 106 LONG = 316, 107 MAP = 317, 108 MAX_K = 318, 109 MEMORY = 319, 110 MIN_K = 320, 111 NEXT = 321, 112 NOCROSSREFS = 322, 113 NOFLOAT = 323, 114 NOLOAD = 324, 115 ONLY_IF_RO = 325, 116 ONLY_IF_RW = 326, 117 ORG = 327, 118 ORIGIN = 328, 119 OUTPUT = 329, 120 OUTPUT_ARCH = 330, 121 OUTPUT_FORMAT = 331, 122 OVERLAY = 332, 123 PHDRS = 333, 124 PROVIDE = 334, 125 PROVIDE_HIDDEN = 335, 126 QUAD = 336, 127 SEARCH_DIR = 337, 128 SECTIONS = 338, 129 SEGMENT_START = 339, 130 SHORT = 340, 131 SIZEOF = 341, 132 SIZEOF_HEADERS = 342, 133 SORT_BY_ALIGNMENT = 343, 134 SORT_BY_INIT_PRIORITY = 344, 135 SORT_BY_NAME = 345, 136 SPECIAL = 346, 137 SQUAD = 347, 138 STARTUP = 348, 139 SUBALIGN = 349, 140 SYSLIB = 350, 141 TARGET_K = 351, 142 TRUNCATE = 352, 143 VERSIONK = 353, 144 OPTION = 354, 145 PARSING_LINKER_SCRIPT = 355, 146 PARSING_VERSION_SCRIPT = 356, 147 PARSING_DEFSYM = 357, 148 PARSING_DYNAMIC_LIST = 358, 149 PARSING_SECTIONS_BLOCK = 359, 150 PARSING_SECTION_COMMANDS = 360, 151 PARSING_MEMORY_DEF = 361 152 }; 153 #endif 154 /* Tokens. */ 155 #define PLUSEQ 258 156 #define MINUSEQ 259 157 #define MULTEQ 260 158 #define DIVEQ 261 159 #define LSHIFTEQ 262 160 #define RSHIFTEQ 263 161 #define ANDEQ 264 162 #define OREQ 265 163 #define OROR 266 164 #define ANDAND 267 165 #define EQ 268 166 #define NE 269 167 #define LE 270 168 #define GE 271 169 #define LSHIFT 272 170 #define RSHIFT 273 171 #define UNARY 274 172 #define STRING 275 173 #define QUOTED_STRING 276 174 #define INTEGER 277 175 #define ABSOLUTE 278 176 #define ADDR 279 177 #define ALIGN_K 280 178 #define ALIGNOF 281 179 #define ASSERT_K 282 180 #define AS_NEEDED 283 181 #define AT 284 182 #define BIND 285 183 #define BLOCK 286 184 #define BYTE 287 185 #define CONSTANT 288 186 #define CONSTRUCTORS 289 187 #define COPY 290 188 #define CREATE_OBJECT_SYMBOLS 291 189 #define DATA_SEGMENT_ALIGN 292 190 #define DATA_SEGMENT_END 293 191 #define DATA_SEGMENT_RELRO_END 294 192 #define DEFINED 295 193 #define DSECT 296 194 #define ENTRY 297 195 #define EXCLUDE_FILE 298 196 #define EXTERN 299 197 #define FILL 300 198 #define FLOAT 301 199 #define FORCE_COMMON_ALLOCATION 302 200 #define GLOBAL 303 201 #define GROUP 304 202 #define HIDDEN 305 203 #define HLL 306 204 #define INCLUDE 307 205 #define INHIBIT_COMMON_ALLOCATION 308 206 #define INFO 309 207 #define INPUT 310 208 #define KEEP 311 209 #define LEN 312 210 #define LENGTH 313 211 #define LOADADDR 314 212 #define LOCAL 315 213 #define LONG 316 214 #define MAP 317 215 #define MAX_K 318 216 #define MEMORY 319 217 #define MIN_K 320 218 #define NEXT 321 219 #define NOCROSSREFS 322 220 #define NOFLOAT 323 221 #define NOLOAD 324 222 #define ONLY_IF_RO 325 223 #define ONLY_IF_RW 326 224 #define ORG 327 225 #define ORIGIN 328 226 #define OUTPUT 329 227 #define OUTPUT_ARCH 330 228 #define OUTPUT_FORMAT 331 229 #define OVERLAY 332 230 #define PHDRS 333 231 #define PROVIDE 334 232 #define PROVIDE_HIDDEN 335 233 #define QUAD 336 234 #define SEARCH_DIR 337 235 #define SECTIONS 338 236 #define SEGMENT_START 339 237 #define SHORT 340 238 #define SIZEOF 341 239 #define SIZEOF_HEADERS 342 240 #define SORT_BY_ALIGNMENT 343 241 #define SORT_BY_INIT_PRIORITY 344 242 #define SORT_BY_NAME 345 243 #define SPECIAL 346 244 #define SQUAD 347 245 #define STARTUP 348 246 #define SUBALIGN 349 247 #define SYSLIB 350 248 #define TARGET_K 351 249 #define TRUNCATE 352 250 #define VERSIONK 353 251 #define OPTION 354 252 #define PARSING_LINKER_SCRIPT 355 253 #define PARSING_VERSION_SCRIPT 356 254 #define PARSING_DEFSYM 357 255 #define PARSING_DYNAMIC_LIST 358 256 #define PARSING_SECTIONS_BLOCK 359 257 #define PARSING_SECTION_COMMANDS 360 258 #define PARSING_MEMORY_DEF 361 259 260 /* Value type. */ 261 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 262 263 union YYSTYPE 264 { 265 #line 53 "yyscript.y" /* yacc.c:1910 */ 266 267 /* A string. */ 268 struct Parser_string string; 269 /* A number. */ 270 uint64_t integer; 271 /* An expression. */ 272 Expression_ptr expr; 273 /* An output section header. */ 274 struct Parser_output_section_header output_section_header; 275 /* An output section trailer. */ 276 struct Parser_output_section_trailer output_section_trailer; 277 /* A section constraint. */ 278 enum Section_constraint constraint; 279 /* A complete input section specification. */ 280 struct Input_section_spec input_section_spec; 281 /* A list of wildcard specifications, with exclusions. */ 282 struct Wildcard_sections wildcard_sections; 283 /* A single wildcard specification. */ 284 struct Wildcard_section wildcard_section; 285 /* A list of strings. */ 286 String_list_ptr string_list; 287 /* Information for a program header. */ 288 struct Phdr_info phdr_info; 289 /* Used for version scripts and within VERSION {}. */ 290 struct Version_dependency_list* deplist; 291 struct Version_expression_list* versyms; 292 struct Version_tree* versnode; 293 enum Script_section_type section_type; 294 295 #line 296 "yyscript.h" /* yacc.c:1910 */ 296 }; 297 298 typedef union YYSTYPE YYSTYPE; 299 # define YYSTYPE_IS_TRIVIAL 1 300 # define YYSTYPE_IS_DECLARED 1 301 #endif 302 303 304 305 int yyparse (void* closure); 306 307 #endif /* !YY_YY_YYSCRIPT_H_INCLUDED */ 308