Message ID | 20230213122241.6144-1-binutils@emagii.com |
---|---|
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2311931wrn; Mon, 13 Feb 2023 04:23:08 -0800 (PST) X-Google-Smtp-Source: AK7set+FDcpYRIkV4SdFViNNbsT29IhVhoFbVWsuq683IXvSMPjFudgEV40e0EynRj5hj1+6pvIZ X-Received: by 2002:a50:ee8f:0:b0:4ab:1715:2858 with SMTP id f15-20020a50ee8f000000b004ab17152858mr6886038edr.11.1676290988876; Mon, 13 Feb 2023 04:23:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676290988; cv=none; d=google.com; s=arc-20160816; b=J+3hSw6btL+5Vj71O96bKZpD9+h68BfGAzaYvFGA+vxABNlj8NQ/6HHHw7R5Wik6vL 5wZC84b6XiOcXpIJYo8PglhWc20iEQTgomRZbx/ot65z+araIOodM3tAR/SxscBeFT9W 2unX3mni2Ehcfp36oLDSFBIJgVcxNjwmmktvsPUol3c4LelqC2oAVmdR539fD8W28wTu 9hNcOz7wQx4uQ9Pmm3+Db8WkoYAtECTgd13txozNTaheyEJZbYQQBQRR166pqmsk/lQr rPOsKW5+MI1RGS/5eUwDHn9yZEnOCzrtAAG01AxRcgx2laAtk44UVMrQTQjA9NijhBiD VTfg== 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:message-id:date :subject:cc:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=t/I9TKNVQIEGB23xFbzeN11u08B9s8GAjU//2e2A6gI=; b=aQsz3+ft8M6+y05wWGLcja7RX6m/OUZaJ4cr971WmbNfNHYNQwO8N8BEUsZk/qQEwj qjKmZKOqQOtWJGZIP5LQYJRPnHOkcFhn4YFQIPNf+v0KMWUWD2rXvYDSpzCumKejAAwo joTg7TOh27MOmZ1LL3exXU/T3WVuVQ3C10vzTjhOPjHKvzNq1g4VmFRlgFB48IaXd51v TuyPIrR8DqTLfw4sD08AjJFFj1JM+gOru73iBDJ/bQcWkbb+PP/BOwZ1qzV7cifnYK8E LJJI3FJBwtKLydVGBwoCphBaKm8hgcZyxX8BeTts3jWEPmRDUQDC+6GY6jA7fZba6lyO ALjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Tw8XBolg; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e4-20020a170906748400b0084cd1ecf33csi9094975ejl.739.2023.02.13.04.23.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:23:08 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Tw8XBolg; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 DAAEB383FBB8 for <ouuuleilei@gmail.com>; Mon, 13 Feb 2023 12:23:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAAEB383FBB8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676290986; bh=t/I9TKNVQIEGB23xFbzeN11u08B9s8GAjU//2e2A6gI=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Tw8XBolgSM6hYakGPoIGChZ95jBnG3LVuMiaw7aL0Abbg3g1g8RjrkVGlt0eMX2QK GV1T9BqFgVsildsZ42tR43/DszHJFB8J51Y3XbCpO8rADkhSjwKj75dPxgUtI6cJdc G0N/1kfW+fgO+LPwkXO+QtKSijQ7vaH0wyIeljOo= 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 A36313857C55 for <binutils@sourceware.org>; Mon, 13 Feb 2023 12:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A36313857C55 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) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Ulf Samuelsson via Binutils <binutils@sourceware.org> Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757718499673979652?= X-GMAIL-MSGID: =?utf-8?q?1757718499673979652?= |
Series |
ASCIZ Command for output section
|
|
Message
Frager, Neal via Binutils
Feb. 13, 2023, 12:22 p.m. UTC
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 <string>' command [PATCH 3/5] Parse ASCIZ command [PATCH 4/5] Document the ASCIZ command [PATCH 5/5] Use lang_add_data