diff options
author | Jan Beulich <jbeulich@novell.com> | 2016-07-05 11:36:08 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2016-07-05 11:36:08 +0200 |
commit | 1753ed681125949b081376dd97056a3f2930e7d7 (patch) | |
tree | 604de3fef2f91ab1dde48fba430522615b6e30e2 /ld/ldlex.l | |
parent | 33d0ab95489cb3cf7ec98bee63c3541b5295adb6 (diff) | |
download | gdb-1753ed681125949b081376dd97056a3f2930e7d7.zip gdb-1753ed681125949b081376dd97056a3f2930e7d7.tar.gz gdb-1753ed681125949b081376dd97056a3f2930e7d7.tar.bz2 |
ld: track linker-definedness of symbols
Keep "lineno" as zero while not processing any script, and use it being
zero to set the "linker_def" field to true.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r-- | ld/ldlex.l | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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. */ @@ -460,7 +459,10 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* <<EOF>> { include_stack_ptr--; if (include_stack_ptr == 0) - yyterminate (); + { + lineno = 0; + yyterminate (); + } else yy_switch_to_buffer (include_stack[include_stack_ptr]); |