X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fldlex.l;h=e1394a035762d7767a78c4f2eea17928a6839060;hb=ff20cab8a222c43de501a340016e11cae6a272a7;hp=d70fad1a975d816362b609369d653e91e00e5e75;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ldlex.l b/ld/ldlex.l index d70fad1a97..e1394a0357 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -39,9 +39,8 @@ yylex and yyparse (indirectly) both check this. */ input_type parser_input; -/* Line number in the current input file. - (FIXME Actually, it doesn't appear to get reset for each file?) */ -unsigned int lineno = 1; +/* Line number in the current input file. */ +unsigned int lineno; /* The string we are currently lexing, or NULL if we are reading a file. */ @@ -298,6 +297,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* "BYTE" { RTOKEN( BYTE);} "NOFLOAT" { RTOKEN(NOFLOAT);} "NOCROSSREFS" { RTOKEN(NOCROSSREFS);} +"NOCROSSREFS_TO" { RTOKEN(NOCROSSREFS_TO);} "OVERLAY" { RTOKEN(OVERLAY); } "SORT_BY_NAME" { RTOKEN(SORT_BY_NAME); } "SORT_BY_ALIGNMENT" { RTOKEN(SORT_BY_ALIGNMENT); } @@ -459,7 +459,10 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* <> { include_stack_ptr--; if (include_stack_ptr == 0) - yyterminate (); + { + lineno = 0; + yyterminate (); + } else yy_switch_to_buffer (include_stack[include_stack_ptr]);