1 /* script-c.h -- C interface for linker scripts in gold. */
3 /* Copyright 2006, 2007 Free Software Foundation, Inc.
4 Written by Ian Lance Taylor <iant@google.com>.
6 This file is part of gold.
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.
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.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 /* This file exists so that both the bison parser and script.cc can
24 include it, so that they can communicate back and forth. */
26 #ifndef GOLD_SCRIPT_C_H
27 #define GOLD_SCRIPT_C_H
35 /* The bison parser function. */
38 yyparse(void* closure);
40 /* Called by the bison parser skeleton to return the next token. */
43 yylex(YYSTYPE*, void* closure);
45 /* Called by the bison parser skeleton to report an error. */
48 yyerror(void* closure, const char*);
50 /* Called by the bison parser to add a file to the link. */
53 script_add_file(void* closure, const char*);
55 /* Called by the bison parser to start and stop a group. */
58 script_start_group(void* closure);
60 script_end_group(void* closure);
62 /* Called by the bison parser to start and end an AS_NEEDED list. */
65 script_start_as_needed(void* closure);
67 script_end_as_needed(void* closure);
69 /* Called by the bison parser to set the entry symbol. */
72 script_set_entry(void* closure, const char*);
74 /* Called by the bison parser to parse an OPTION. */
76 script_parse_option(void* closure, const char*);
82 #endif /* !defined(GOLD_SCRIPT_C_H) */