Message ID | e9911121-3d68-48ec-99a1-4394f749696e@suse.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AD8743858C3A for <patchwork@sourceware.org>; Wed, 31 Jul 2024 11:56:28 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 87D69385B503 for <binutils@sourceware.org>; Wed, 31 Jul 2024 11:55:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87D69385B503 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87D69385B503 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722426945; cv=none; b=mLejIcwiJs3LDT3fg+AxZdDOadq74TzWFOCNbnQ0yLVJPI1EFcxA3qgiU1xuC8HFk9/bZn2b9OJlfwTzsij8Ggze1VL64A5JqJFQV3eNDfhx1h4CNAOTrkxIkpqj5zqP9a+o2Mwcftt5DuVx5bQZVoRUYgtoisWPpIdi2e8XxBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722426945; c=relaxed/simple; bh=tgZ7FUmjvIXbbLuAjNDnhmThTFwYKD3AgxMJcf/nv+I=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=bVWJr8E9DWjufCYkl0AKbYR4SG6T6Ce0wxW2pKLQFY4oL+qInJGj9+unHWwXbpmTzhttPlDapmuX5GDXIJn1+vSBKiijn66MAH6DAEaWSDzwM5tJceRVIHYimAIh/+1mz6NWACzBANPh0SlCqlz2spOe6xA/CNbHD1yIIM0hHkA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52efa16aad9so8499358e87.0 for <binutils@sourceware.org>; Wed, 31 Jul 2024 04:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1722426942; x=1723031742; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MWcxOqyj1qgi0hS3TuTQgJ3rW5ggin36t7c2cdBhqxA=; b=e7fCKVRGlR5DGuEB80rPAYC2M8wpiO59vaOmt6ukQQWtmpLAcGGUAfagR4tuU5h+kC D967CwoFx3sJhUUCb8o7rNnKkkJMI6BXzA443f51YxxL3yFKDBaEQPCXiFxu1aZlyrqK QrTpSYB31/BjT7ielPJPaR/cIwR80JZ6TCG/0FD7v0ulQxJYg/7A8OuACKQ5r+uBHPVF zGUHKNctOZldkfrRLfzzc+uCowxxn0iqh2oe2iCBfDjJtZYn8QSWjgKOUTcg6NU90CIl e9Nh1tzYvQNtXnaZ8P0FDPU0CwKsjvitKQQUtpm95R6/8v0J/bHc+F69+2evpXHm4Lql OqBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722426942; x=1723031742; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MWcxOqyj1qgi0hS3TuTQgJ3rW5ggin36t7c2cdBhqxA=; b=vEemAMOnT6Eyqua4PGqb1JOqkiBdBSffc64FjSDm9dVZC7M75R5tzxollIxgq+Ooeb bQHavaryzGw7N6WFtXbn3lW5Ho8XnHmU88RPPiweOQ/5UJJkJWSmp2zBtZmkOkL99fU5 wMk4F3tB6rGuPAjLq4PRTd5zmZP7G3uC50VNzWcbRsaIoDVDWfiY70LVsyKT+4oT0veS IhzrwR26KDWgIspf5/WC220Pf7i7jJbF/LZbN9UEJBNBfXHCov1IBBCsjgKCxKcBRBxz F2gR3fcmBwCihCQL3tV5NWzo4hd9zaa6Oy0zu/2OE2l+eMTQ9KLIFYhmF3Pfk1YiNbn2 0w1w== X-Gm-Message-State: AOJu0YzXK08XsrRlBEQpRPc+lgPzB9hPUj5Q0LeUL0DQjURsFNLJfjCb 0LvktYNRNpEDR1i1mRZw5HeKMnWirEL+YLZfL0ZDm3Q2m/1jWbU+ep7br5CEJk2IpbNoapZFMDY = X-Google-Smtp-Source: AGHT+IElifw/JYEbrMy7oThzNiTHt9eiEV+hQRqM11kXEmJGnqZRLEMuuJgMXHlJFTozWaxaPA7cOA== X-Received: by 2002:ac2:4bd1:0:b0:52e:9b92:4999 with SMTP id 2adb3069b0e04-5309b269ae5mr12279873e87.2.1722426941854; Wed, 31 Jul 2024 04:55:41 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac655811d6sm8652576a12.83.2024.07.31.04.55.41 for <binutils@sourceware.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Jul 2024 04:55:41 -0700 (PDT) Message-ID: <e9911121-3d68-48ec-99a1-4394f749696e@suse.com> Date: Wed, 31 Jul 2024 13:55:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 2/9] gas: respect CR_EOL also for scrubbing From: Jan Beulich <jbeulich@suse.com> To: Binutils <binutils@sourceware.org> References: <7e951d11-cccf-4851-84a6-3a85cda8254a@suse.com> Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSo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rteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <7e951d11-cccf-4851-84a6-3a85cda8254a@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3023.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
Series |
gas: scrubber adjustments
|
|
Commit Message
Jan Beulich
July 31, 2024, 11:55 a.m. UTC
While apparently intended to be only externally controlled (e.g. via specifying CFLAGS at make invocation), we should still keep scrubber and lexer in sync in this regard. There's one place which imo was previously wrong already, but would go further wrong and hence is being adjusted right here: An .mri directive can be terminated by any kind of "line" (really: statement) separators. --- Btw, is it actually correct to honor line_comment_chars[] after other than a physical line break (LEX_IS_NEWLINE), possibly followed by whitespace? Aren't these forms of comments meant to remove entire physical lines only, but not tails thereof? After all the processing of such a comment looks for a newline, not just a line separator. --- v3: New.
--- a/gas/app.c +++ b/gas/app.c @@ -93,7 +93,11 @@ static char last_char; static char lex[256] = { [' '] = LEX_IS_WHITESPACE, ['\t'] = LEX_IS_WHITESPACE, +#ifdef CR_EOL + ['\r'] = LEX_IS_LINE_SEPARATOR, +#else ['\r'] = LEX_IS_WHITESPACE, +#endif ['\n'] = LEX_IS_NEWLINE, [':'] = LEX_IS_COLON, ['$'] = LEX_IS_SYMBOL_COMPONENT, @@ -862,7 +866,9 @@ do_scrub_chars (size_t (*get) (char *, s ++mri_state; } else if (*mri_state != '\0' - || (!IS_WHITESPACE (ch) && !IS_NEWLINE (ch))) + || (!IS_WHITESPACE (ch) + && !IS_LINE_SEPARATOR (ch) + && !IS_NEWLINE (ch))) { /* We did not get the expected character, or we didn't get a valid terminating character after seeing the