From patchwork Mon Feb 13 12:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Samuelsson X-Patchwork-Id: 56262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2311973wrn; Mon, 13 Feb 2023 04:23:14 -0800 (PST) X-Google-Smtp-Source: AK7set8E3KgXgJT/78YZeRitBe0g4nropzGk+rdpcvap7P+IOf6hgodr3oGLnHFA8ZV987snW190 X-Received: by 2002:a17:906:2dc1:b0:89b:66b9:1b71 with SMTP id h1-20020a1709062dc100b0089b66b91b71mr26199993eji.60.1676290993971; Mon, 13 Feb 2023 04:23:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676290993; cv=none; d=google.com; s=arc-20160816; b=Wleolzhr73+kYfdAI8WJhdw1p9tpi5IUOnNpYPU9Z62mIDJRiywdXnMC3oSPjBEKk9 gSrPB+K3Bh8AHLF8imQH/7rwbsboEuKuB5A0zjSLZ+cfA9JhSL85JE/l5wn4NeG7Ly3a FbtaKQV+5CH1Yik8mvgb6CwXb3BY+QpXlHOQMdK09DxU/uFWXEzgTHNtWj8vjdR6iwbf 19HlHTtGE6oST4+zXatIjIX51DV4Q/27NASVpvTrEkWxPGiJ9C2QPY5rNVabbmIJS3bZ nV7SHJKMTa3PyaRp7TflxD+y7ut6Ki/yjCywjtRG4oePRmDIh0Chi0NpDIJAyidnvYCe fdcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=qcWRof6HZl1DjZmMdfsCRRnQi1mmQX6xqwhNDv90kJI=; b=tavZBjLCy7p+d1xcOqdZ923E25yorg6PrdkdgIGo/5WLUQaitwlVAx5wAuEXRFfIWS tKY/Lf5xW0L3hUJ2AQxxBOuX9Dz428M1Sbadfwaj+iI4mriNGSKHNlBYEBIR89Yhsdw5 0qcmzYxR6vsaJibs2fgP+PSq7qUyzyYPuhSf3wAVY6ZhjkU9kQaHkT1qIaOdWkLINnrm NOK8mr2GxWTwghazgQMOziOnRHX0d7kRmbfZuz599I6FTTMAFnKgOw7Gz9fCuaijl3cR DK7ZVxC8fxC1JaFIsIC4IhTbX6G0dIOjoQnZR6BCxov4NUwpeZMgOkqdsvBNWsoWSjCw l0tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=NVrkA9fB; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bf10-20020a170906c50a00b008aaf5738e5csi13749572ejb.259.2023.02.13.04.23.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:23:13 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=NVrkA9fB; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92BED383DB8C for ; Mon, 13 Feb 2023 12:23:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92BED383DB8C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676290990; bh=qcWRof6HZl1DjZmMdfsCRRnQi1mmQX6xqwhNDv90kJI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=NVrkA9fB0cGh8+wL7Hg33Xth0SHWUITkRNqcQonpVrxxTrUvui0o9+ivfveRNigMn /4UMxFsrcJmQaasKyk3ufHqVwgWgqeDvYx/cWNnemyRslOEYpYm6dyBncADMvMG3AU bd+I/UqROcrDyuJ28MvvtEvAQHtvO3beibkIewVs= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 584DC384F00E for ; Mon, 13 Feb 2023 12:22:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 584DC384F00E Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id E43FD120205; Mon, 13 Feb 2023 13:22:56 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Ulf Samuelsson Subject: [PATCH v2 2/5] ldgram.y: Add 'ASCIZ ' command Date: Mon, 13 Feb 2023 13:22:38 +0100 Message-Id: <20230213122241.6144-3-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230213122241.6144-1-binutils@emagii.com> References: <20230213122241.6144-1-binutils@emagii.com> X-PPP-Message-ID: <167629097723.3735089.5714903421189094385@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham 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.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: Ulf Samuelsson Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757718505323268093?= X-GMAIL-MSGID: =?utf-8?q?1757718505323268093?= From: Ulf Samuelsson Signed-off-by: Ulf Samuelsson --- ld/ldgram.y | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ld/ldgram.y b/ld/ldgram.y index fa5f01fef1d..67e75d43067 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -125,7 +125,7 @@ static int error_index; %right UNARY %token END %left '(' -%token ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE +%token ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE ASCIZ %token SECTIONS PHDRS INSERT_K AFTER BEFORE %token DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END %token SORT_BY_NAME SORT_BY_ALIGNMENT SORT_NONE @@ -668,7 +668,10 @@ statement: { lang_add_data ((int) $1, $3); } - + | ASCIZ NAME + { + lang_add_stringz($2); + } | FILL '(' fill_exp ')' { lang_add_fill ($3);