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 92A2C385842C for ; Mon, 13 Feb 2023 16:11:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92A2C385842C 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 43C2A12019C; Mon, 13 Feb 2023 17:11:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676304688; bh=fWefIdUVGospqi2Kgc5Js6YJuExQKzSVWa8J24fgpVc=; h=From:To:Subject; b=1TydD8duzaKJejdZRrvs5SPPsW6dfGbckooyRgi8lTEfV0cYmnMhEhmZNLjXP5bys sTJqrM8C/yzzbzYIaRaXcbpIA+frN1EXf7oILQQgtew0wYf9nWi8ZR3XPFyOsKcFa2 ue2QZEqtwoHaJpJQNgy8aKjU92vxfJDTP881ZpcA= 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 v3 0/6] ASCIZ Command for output section Date: Mon, 13 Feb 2023 17:11:18 +0100 Message-Id: <20230213161124.15340-1-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 X-PPP-Message-ID: <167630468856.3742930.5579581620083702197@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-5.2 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 v3 1/6] Document the ASCIZ command [PATCH v3 2/6] Add ASCIZ to NEWS [PATCH v3 3/6] Add ASCIZ to testsuite [PATCH v3 4/6] ldlex.l: Add ASCIZ token [PATCH v3 5/6] ldgram.y: Add 'ASCIZ ' command [PATCH v3 6/6] Parse ASCIZ command