From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 32946384F034 for ; Fri, 10 Feb 2023 17:44:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 32946384F034 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 89B131207DE for ; Fri, 10 Feb 2023 18:44:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676051054; bh=lA9NeC1B1u8SDXKmwZsFf7lzkkkbVkULgqRaAd7UzH8=; h=From:To:Subject; b=fmltIUJ92q+8i+wy/wOh+euoP95sZjcwkk63AHuWhvnRKqGVS1nqJcMROyyvKklL4 jw9Xk35rk654WBV6gFe/KEdu/PKq6Oasok5f/+0Jb2caVBx2ud0c9lY1BVvazDhk/V BqTWDrTyyvekvDDeoKLzffi4Ilwz07METLVeJTEw= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Subject: Date: Fri, 10 Feb 2023 18:44:00 +0100 Message-Id: <20230210174404.3763-1-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 X-PPP-Message-ID: <167605105480.3626968.10876552495576789426@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_BLANKSUBJECT,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 List-Id: >From binutils@emagii.com # This line is ignored. From: binutils@emagii.com Reply-To: Subject: ASCIZ Command for output section In-Reply-To: Introduce an ASCIZ command for an output section When generating a header for an embedded system there is often a need to add text information. There are arguments for generating the header in the linker instead of compiling the header as part of the program. The lack of support for strings makes this process a bit unwieldy. The ASCIZ command allows you to specify a zero-terminated string as a parameter. Example: ASCIZ "This is a string" The string contains 16 characters, but a NUL character is added to the end, so the areas reserved is 16+1 = 17 characters. Ideally, there should be a command which reserves a fixed size area. I:E: ASCII 20, "This is a string" but I have failed to get make this work in 'ld', so this patch series is limited to ASCIZ. Best Regards Ulf Samuelsson [PATCH 1/4] ldlex.l: Add ASCIZ token [PATCH 2/4] ldgram.y: Add 'ASCIZ ' command [PATCH 3/4] Parse ASCIZ command [PATCH 4/4] Document the ASCIZ command