aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-04-17 15:59:37 +0000
committerSteve Chamberlain <sac@cygnus>1992-04-17 15:59:37 +0000
commit0d3e45eab084b2bca8b6e3dc94952264868b033b (patch)
tree9081e1bf004a738bffdebfbd8759e5095419db04 /ld/ldlex.l
parentb0c8c726888d90783a178afe4df237083ac70c8f (diff)
downloadgdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.zip
gdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.tar.gz
gdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.tar.bz2
* relax.c: added handling for new "padding" seclet type, used to
fill out gaps between section. * ldgram.y, ldlex.l: now -defsym on the command line is done properly.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l23
1 files changed, 19 insertions, 4 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index 28e067b..b52ba2e 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -1,4 +1,5 @@
%{
+
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -65,7 +66,8 @@ unsigned int include_stack_ptr = 0;
%a 4000
%o 5000
FILENAMECHAR1 [_a-zA-Z\/\.\\]
-FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\]
+SYMBOLCHARN [_a-zA-Z\/\.\\0-9]
+FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\]
FILENAME {FILENAMECHAR}+
WHITE [ \t\n]+
@@ -74,10 +76,16 @@ WHITE [ \t\n]+
%x EXPRESSION
%x COMMENT
%x BOTH
+%x DEFSYMEXP
%x MRI
%%
-<COMMAND>"-defsym" { return OPTION_defsym; }
+<DEFSYMEXP>"-" { RTOKEN('-');}
+<DEFSYMEXP>"+" { RTOKEN('+');}
+<DEFSYMEXP>{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = buystring(yytext); return NAME; }
+<DEFSYMEXP>[ \t] { RTOKEN(DEFSYMEND); }
+<DEFSYMEXP>"=" { RTOKEN('='); }
+<COMMAND>"-defsym"{WHITE}* { return OPTION_defsym; }
<COMMAND>"-noinhibit_exec" { return OPTION_noinhibit_exec; }
<COMMAND>"-noinhibit-exec" { return OPTION_noinhibit_exec; }
<COMMAND>"-sort_common" { return OPTION_sort_common;}
@@ -441,8 +449,15 @@ BEGIN(SCRIPT);
void
DEFUN_VOID(ldlex_mri_script)
{
- *(state_stack_p)++ = yy_start;
- BEGIN(MRI);
+*(state_stack_p)++ = yy_start;
+BEGIN(MRI);
+}
+
+void
+DEFUN_VOID(ldlex_defsym)
+{
+*(state_stack_p)++ = yy_start;
+BEGIN(DEFSYMEXP);
}
void