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