summaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-10-20 13:49:00 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-10-20 13:49:00 +0000
commitc377c93bc762f8cbd46c8e6bb13313b5a2dc4ae4 (patch)
tree8791ad68978a07e7d8d8bc5a33ab536409648209 /ld/ldgram.y
parentc4b74e94bf6ecadf739c64007f119f853caabccd (diff)
downloadbinutils-redhat-c377c93bc762f8cbd46c8e6bb13313b5a2dc4ae4.tar.gz
* ldgram.y (mri_script_command): Surround processing of INCLUDE
with ldlex_script, ldlex_popstate. (ifile_p1): Likewise. * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the correct slot. (lex_push_file): Save current lineno to lineno_stack. Set lineno to 1. Don't BEGIN(SCRIPT). (lex_redirect): Similarly. * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r--ld/ldgram.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index 25d8d090b2..c57ad15816 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -238,7 +238,9 @@ mri_script_command:
| CASE casesymlist
| EXTERN extern_name_list
| INCLUDE filename
- { ldfile_open_command_file ($2); } mri_script_lines END
+ { ldlex_script (); ldfile_open_command_file($2); }
+ mri_script_lines END
+ { ldlex_popstate (); }
| START NAME
{ lang_add_entry ($2, false); }
|
@@ -332,7 +334,9 @@ ifile_p1:
| MAP '(' filename ')'
{ lang_add_map($3); }
| INCLUDE filename
- { ldfile_open_command_file($2); } ifile_list END
+ { ldlex_script (); ldfile_open_command_file($2); }
+ ifile_list END
+ { ldlex_popstate (); }
| NOCROSSREFS '(' nocrossref_list ')'
{
lang_add_nocrossref ($3);