From patchwork Fri Feb 10 17:44:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Samuelsson X-Patchwork-Id: 55503 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1088905wrn; Fri, 10 Feb 2023 09:47:14 -0800 (PST) X-Google-Smtp-Source: AK7set9dEBikyEEhVGdQ8uXrM0TCOrUxpwng9zNtb9QE5r78poyTGbuWR90tdDQXSSnPkUxNVTiG X-Received: by 2002:a17:906:b888:b0:881:efcd:1bc4 with SMTP id hb8-20020a170906b88800b00881efcd1bc4mr17064341ejb.46.1676051234502; Fri, 10 Feb 2023 09:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676051234; cv=none; d=google.com; s=arc-20160816; b=Moo9DZeQlkmpYqDbcK9oqtYYRyyevb9Yrds6cwjjnoOu8bZYrcbDkytryvIaGpahau xuFOf+L3NJKGWnM4ayU2uFnHEVvY/u8HhZHRG5zg8W0PDHVyaiVyVDV1pYkDFQgs0XB0 OpY94v5M5wiSnkttbbBc4GbTwB8o1HgsWKaOP2y2kbkeVHDbxGgIEU2mrMUMQCf1XjdC aP6fjdKlW/Q3YgiXJNKv6rOQXZ6kPkaDowbJLtTgfvGAwaS7x91e2ktHkaYuALLRQWay uK5ErMaDINedY4MnLT3/TGcfHyp2ac1kI2xIaKaJwbCRaGd/vtIc8xYA7D44Nci0gv9n FeWQ== 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=o8WROMXgoOChrAycYCFskaKUJ3/vGWk9jGP+p3iMsfCt+9fPeJ0LOvLuPFMi0QAGqV Td/73eVePsckFUKj0kbfpmBDpc3326qWmWwPOQH7gRZbQ68/cOFuJdMGIOpjBOj+haMU cWikIA5p8NH48urme/PVrfBrW5dQHUekV5hQpOSzhcO1AARJnHVJp8qIZLpED1An4/nB XX8Ky+JN289zCpZ8OHnETqh5L5a13yn2MvGoyHoHMkst2isKKaLIG5WmB0jlm/dFIl7w 9WyEXJN7VJv+SQL5E+d6AFhs2jzkRkMLsRXxgrgUUO99ePaaLL9ltXIOTppvbs2rOTTC 58zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=MiD2iw9L; 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 fg22-20020a1709069c5600b0089379086f86si5003960ejc.432.2023.02.10.09.47.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 09:47:14 -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=MiD2iw9L; 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 BCA893896C31 for ; Fri, 10 Feb 2023 17:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCA893896C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676051133; 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=MiD2iw9L9RY1eguGA3WhJZgz8AoBlUUC98/KBMri3fOkKMpRxndXrMHyvL6Ku48zq 3HlwXumoEDWddofpp4hU22wzoBUpbMsQWwbGRLPg5mi5/n1adltOKwoDwrUxqS0716 r0pXqswoEMV07gYr5XFhCr5JI+ps+8r5EC20sz3E= 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 9CA6B3843851 for ; Fri, 10 Feb 2023 17:44:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CA6B3843851 Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 4C15A1207EC; Fri, 10 Feb 2023 18:44:15 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: Ulf Samuelsson Subject: [PATCH 2/4] ldgram.y: Add 'ASCIZ ' command Date: Fri, 10 Feb 2023 18:44:02 +0100 Message-Id: <20230210174404.3763-3-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230210174404.3763-1-binutils@emagii.com> References: <20230210174404.3763-1-binutils@emagii.com> X-PPP-Message-ID: <167605105558.3626989.9463563762224922481@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.0 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?1757467099446570502?= X-GMAIL-MSGID: =?utf-8?q?1757467099446570502?= 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);