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 A36313857C55 for ; Mon, 13 Feb 2023 12:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A36313857C55 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 1B6E312019C; Mon, 13 Feb 2023 13:22:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676290976; bh=t/I9TKNVQIEGB23xFbzeN11u08B9s8GAjU//2e2A6gI=; h=From:To:Subject; b=irn5zejzhjwtOQtfU9mNVfDSdjHiHTMeEbX2k8CqEo87okfRZPmpiWivMlOEpJEKH oSe1K6/U9CiuRV1SVZEotKFgYe3lESk1SqUeA04NKoEt6BkXE5cuGVfgU40fuGFOTJ jfEjGrxKT+YPI7eYH9ImqB/OYPNap1aR94/iKbdM= 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 Cc: nickc@redhat.com Subject: [PATCH v2 0/4] ASCIZ Command for output section Date: Mon, 13 Feb 2023 13:22:36 +0100 Message-Id: <20230213122241.6144-1-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 X-PPP-Message-ID: <167629097636.3735064.3997456891034583383@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: 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. [PATCH 1/5] ldlex.l: Add ASCIZ token [PATCH 2/5] ldgram.y: Add 'ASCIZ ' command [PATCH 3/5] Parse ASCIZ command [PATCH 4/5] Document the ASCIZ command [PATCH 5/5] Use lang_add_data