#include "ldmisc.h"
#include "ldmain.h"
#include "mri.h"
-
-#define YYDEBUG 1
+#include "ldlex.h"
static int typebits;
%token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
%token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM
-%{
-/* For byacc, this has to come after INPUT_SCRIPT et al. are defined. */
-#include "ldlex.h"
-%}
%%
file:
einfo("%P%F: unrecognised keyword in MRI style script '%s'\n",$1);
}
| LIST {
- write_map = true;
config.map_filename = "-";
}
| ORDER ordernamelist
| TARGET_K '(' NAME ')'
{ lang_add_target($3); }
| SEARCH_DIR '(' filename ')'
- { ldfile_add_library_path($3); }
+ { ldfile_add_library_path ($3, false); }
| OUTPUT '(' filename ')'
{ lang_add_output($3, 1); }
| OUTPUT_FORMAT '(' NAME ')'
statement_anywhere:
ENTRY '(' NAME ')'
- { lang_add_entry($3); }
+ { lang_add_entry ($3, 0); }
| assignment end
;
lang_enter_output_section_statement($1,$3,typebits,0,0,0,$4);
}
statement_list_opt
- '}' {ldlex_expression();} fill_opt memspec_opt
+ '}' {ldlex_expression();} memspec_opt fill_opt
{
ldlex_popstate();
- lang_leave_output_section_statement($11, $12);
+ lang_leave_output_section_statement($12, $11);
}
opt_comma