From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129597 invoked by alias); 10 Mar 2017 15:42:05 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 129270 invoked by uid 89); 10 Mar 2017 15:42:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_COUK,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:3150, HTo:D*cc, H*RU:esmtpa, Hx-spam-relays-external:esmtpa X-HELO: claranet-outbound-smtp09.uk.clara.net Received: from claranet-outbound-smtp09.uk.clara.net (HELO claranet-outbound-smtp09.uk.clara.net) (195.8.89.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Mar 2017 15:42:02 +0000 Received: from [80.168.239.61] (port=31246 helo=[192.168.1.199]) by relay09.mail.eu.clara.net (relay.clara.net [81.171.239.39]:10465) with esmtpa (authdaemon_plain:nickclifton) id 1cmMg2-0006pg-Ts (return-path ); Fri, 10 Mar 2017 15:41:58 +0000 Subject: Re: [PATCH] Add documentation of warning if byte size exceeded To: "Tobin C. Harding" References: <1488878554-19889-1-git-send-email-me@tobin.cc> <20170307094203.GB21536@eros> Cc: Alan Modra , binutils@sourceware.org From: Nick Clifton Message-ID: <0aec9701-c006-695b-eae7-0f54ed744f2d@nickclifton.clara.co.uk> Date: Fri, 10 Mar 2017 15:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170307094203.GB21536@eros> Content-Type: multipart/mixed; boundary="------------7CC964E171CBBC5391E66A0E" X-SW-Source: 2017-03/txt/msg00142.txt.bz2 This is a multi-part message in MIME format. --------------7CC964E171CBBC5391E66A0E Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-length: 739 Hi Tobin, >> GAS throws a warning if an attempt is made to declare data that >> exceeds the size allocated when using directives .2byte or .4byte. I have taken your patch and extended it slightly in order to tidy up the wording. Attached is the patch that I have committed. >> I see that the patch prior to this one (commit d10ef45) has caused >> build fail for someone. I did not see this. The documentation builds fine for me. Are you sure that it is still a problem ? Cheers Nick gas/ChangeLog 2017-03-10 Tobin C. Harding Nick Clifton * doc/as.texinfo (2byte): Tidy up wording. Add note that overlarge values will produce a warning message and be trunacted. (4byte): Likewise. --------------7CC964E171CBBC5391E66A0E Content-Type: text/x-patch; name="as.texinfo.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="as.texinfo.patch" Content-length: 2389 diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index a8f014b..3b3e931 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -7345,9 +7345,11 @@ instead of zero. Using @samp{.zero} in this way would be confusing however. @cindex two-byte integer @cindex integer, 2-byte -This directive @code{.2byte}, which is available for ELF targets, expects zero -or more expressions, separated by commas. Each expression is assembled into the -next two bytes. +This directive expects zero or more expressions, separated by commas. Each +expression is evaluated and placed in the next two bytes of the current +section. If an expression will not fit in two bytes, a warning message +is displayed and the lowest two bytes of the expression's value are used. +This directive is only available for ELF targets, @node 4byte @section @code{.4byte @var{expression} [, @var{expression}]*} @@ -7355,9 +7357,11 @@ next two bytes. @cindex four-byte integer @cindex integer, 4-byte -This directive @code{.4byte}, which is available for ELF targets, expects zero -or more expressions, separated by commas. Each expression is assembled into the -next four bytes. +This directive expects zero or more expressions, separated by commas. Each +expression is evaluated and placed in the next four bytes of the current +section. If an expression will not fit in four bytes, a warning message +is displayed and the lowest four bytes of the expression's value are used. +This directive is only available for ELF targets, @node 8byte @section @code{.8byte @var{expression} [, @var{expression}]*} @@ -7365,10 +7369,11 @@ next four bytes. @cindex eight-byte integer @cindex integer, 8-byte -This directive @code{.8byte}, which is available for ELF targets, expects zero -or more bignums, separated by commas. For each bignum, it emits -an 8-byte integer. If the bignum won't fit in 8 bytes, it prints a -warning message; and just takes the lowest order 8 bytes of the bignum. +This directive expects zero or more expressions, separated by commas. Each +expression is evaluated and the resulting bignum is placed in the next eight +bytes of the current section. If an expression will not fit in eight bytes, a +warning message is displayed and the lowest eight bytes of the expression's +value are used. This directive is only available for ELF targets, @end ifset @node Deprecated --------------7CC964E171CBBC5391E66A0E--