bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28217] Syntax error when memory region contains a hyphen


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/28217] Syntax error when memory region contains a hyphen
Date: Fri, 13 Aug 2021 03:04:01 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28217

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=af29a8abcf50ff9cb465a136c68b06bfc2ca7b75

commit af29a8abcf50ff9cb465a136c68b06bfc2ca7b75
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Aug 13 11:50:16 2021 +0930

    PR28217, Syntax error when memory region contains a hyphen

    The saga of commit 40726f16a8d7 continues.  This attacks the problem
    of switching between SCRIPT and EXPRESSION state lexing by removing
    the need to do so for phdrs like ":text".  Instead {WILDCHAR}*
    matching, the reason why ":text" lexed as one token, is restricted to
    within the braces of a section or overlay statement.  The new WILD
    lexer state is switched at the non-optional brace tokens, so
    ldlex_backup is no longer needed.  I've also removed the BOTH state,
    which doesn't seem to be needed any more.  Besides rules involving
    error reporting, there was just one place where SCRIPT appeared
    without BOTH, the {WILDCHAR}* rule, three where BOTH appears without
    SCRIPT for tokens that only need EXPRESSION state, and two where BOTH
    appears alongside INPUT_LIST.  (Since I'm editing the wild and
    filename rules, removing BOTH and adding WILD can also be seen as
    renaming the old BOTH state to SCRIPT and renaming the old SCRIPT
    state to WILD with a reduced scope.)

    As a followup, I'll look at removing EXPRESSION state from some lexer
    rules that no longer need it due to this cleanup.

            PR 28217
            * ldgram.y (exp <ORIGIN, LENGTH>): Use paren_script_name.
            (section): Parse within braces of section in wild mode, and
            after brace back in script mode.  Remove ldlex_backup call.
            Similarly for OVERLAY.
            (overlay_section): Similarly.
            (script_file): Replace ldlex_both with ldlex_script.
            * ldlex.h (ldlex_wild): Declare.
            (ldlex_both): Delete.
            * ldlex.l (BOTH): Delete.  Remove state from all rules.
            (WILD): New state.  Enable many tokens in this state.
            Enable filename match in SCRIPT mode.  Enable WILDCHAR match
            in WILD state, disable in SCRIPT mode.
            (ldlex_wild): New function.
            * ldfile.c (ldfile_try_open_bfd): Replace ldlex_both call with
            ldlex_script.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]