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 C9E623861009 for ; Mon, 8 Jul 2024 11:29:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C9E623861009 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C9E623861009 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.133.207.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720438153; cv=none; b=lRMkdXkQxdz7ZmUvSKDnf9xhBO/8Q+lLPzc2My4tqWcMJQ7t6053X2c53nrnWP0cUhc/5rSzkXc+/qeVKqtLEgLwoztsohq55eL2IZ+2R8sLq4jxD7KUAMau3xyCEf9nmaa8rMyEy9ZxnHLTplDbEw68SOG8Y98QT4LDwAw/dOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720438153; c=relaxed/simple; bh=ML+18QHFS8GnTAuSobpp+67ZpFrkwASsjjj5jaljUBY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Ruvd/TF5WXVZLQYLZRtQgIs68jJVMRqmC6plrTRmDeBQ0EUySDglkMnrTUI8U2igiXmo/zWw8tSpUIPqkc57zaITGQJsUmRS+W9Aoi1S3RYrgK4++cTyf4Rs5S5h19TM1nmp2U9RAiijB6m+zv9k4HmpRE9RQ21tfhv5wOjuoNU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.175.196.111] (host183-192-94.customer.mediateknik.net [193.183.192.94]) by emagii.se (Postfix) with ESMTPSA id 03D7D120188; Mon, 8 Jul 2024 13:29:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1720438150; bh=WAhFLWRyiCiUroUp91idvWzmVLgqV4+JOPUYrRXswdE=; h=Subject:To:From; b=nSF9lZyYXYdCWTtcL9ngvL28AZzwZHA5vjUp3WlPszso3t68cAR9zNyMA9C8fEg0y 3aUoIz9JFjcsd0vsUYh2ihfAsbQeXMHD/7DOi6Ovch2jRGTZ6TnxQA7kyFqka1jxVE mUjLr583FUR9a+a1RQUSGlQXzp9ZW8jLIa0ovaMo= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 193.183.192.94) smtp.mailfrom=binutils@emagii.com smtp.helo=[10.175.196.111] Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) Message-ID: <0e907fb9-e85c-1d72-f2a1-847bb7c86cab@emagii.com> Date: Mon, 8 Jul 2024 13:29:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v1 4/7] ld.texi: Add ASCII to info file Content-Language: sv-FI To: Andreas Schwab Cc: Jan Beulich , Ulf Samuelsson , Binutils , Nick Clifton References: <395a5bb5-f9dc-4645-b3f3-76ae8e102b55@suse.com> <6FDD8EBD-2371-40DB-B25B-052278BCBF49@emagii.com> <8644f7e4-0ca0-42de-9104-6b822e67038d@suse.com> <29c0346f-8456-09a2-a9f8-ce18cbe61ffa@emagii.com> <3c0bf5f6-7756-4e9f-b9ab-b24b2f86771c@suse.com> <3b34f49d-9272-72a2-6d50-3f37c8866b67@emagii.com> From: Ulf Samuelsson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <172043815034.2639616.4071256291329162854@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: Den 2024-07-08 kl. 13:18, skrev Andreas Schwab: > On Jul 08 2024, Ulf Samuelsson wrote: > >> Given *ASCII 16, "This is 16 bytes*"  size == 16 and strlen("This is 16 >> bytes") == 16, >> the linker should add a 16 byte area without a terminating NUL, >> >> If the string is shorter, then the linker should pad with NUL. >> >> If the string is longer, then the linker should truncate the string adding >> a NUL >> at the end, still fitting in the area. A warning should be issued. > This inonsistency is confusing. The directive should either always use > the first size characters from the string, only padding with nulls when > the string is shorter, or reject longer strings at all. > I do not see that the user can be confused if the user reads the warning message: "warning: ASCII string does not fit in allocated space, truncated" -- Best Regards Ulf Samuelsson