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 8FE0C3858D1E for ; Mon, 13 Feb 2023 16:20:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FE0C3858D1E 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 287A812019C; Mon, 13 Feb 2023 17:20:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676305213; bh=JZk20JZ3R1owmzoACN8/qgbOLp2QLjsRDh7513Odb2M=; h=From:To:Subject; b=4yWjeHavjVOUTv43hoMSL+4CTSblMpCuUhIcXAEAXbu2ntMq7frs1RMACpfAhDth8 Nl4EQYaHb40KVm7GkcYSmqJPishDQ2wAu3Kd0OjT1aNjr43CHqVsgXE4E8czB+m/m0 Q2MT6eYd3psWUQlwfpVV1HpnLlEtjmiIvnUYGO0w= 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 v4 0/6] ASCIZ Command for output section Date: Mon, 13 Feb 2023 17:20:03 +0100 Message-Id: <20230213162009.15515-1-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 X-PPP-Message-ID: <167630521342.3743393.6677766267427923563@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-5.7 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. The string may contain '\n', '\r', '\t' and octals, but not hex 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 v4 1/6] Document the ASCIZ command [PATCH v4 2/6] Add ASCIZ to NEWS [PATCH v4 3/6] Add ASCIZ to testsuite [PATCH v4 4/6] ldlex.l: Add ASCIZ token [PATCH v4 5/6] ldgram.y: Add 'ASCIZ ' command [PATCH v4 6/6] Parse ASCIZ command