This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Update descriptions of the .2byte, .4byte and .8byte directives.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e406e428dfe9d64e3be0b7a3c1c97c09edc5bdba

commit e406e428dfe9d64e3be0b7a3c1c97c09edc5bdba
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Mar 20 16:57:07 2017 +0000

    Update descriptions of the .2byte, .4byte and .8byte directives.
    
    	* doc/as.texinfo (2byte): Note that if no expressions are present
    	the directive does nothing.  Emphasize that the output is
    	unaligned, and that this can have an effect on the relocations
    	generated.
    	(4byte): Simplify description.  Refer back to the 2byte
    	description.
    	(8byte): Likewise.

Diff:
---
 gas/ChangeLog      | 10 ++++++++++
 gas/doc/as.texinfo | 32 ++++++++++++++++++--------------
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6541eab..0d723bb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2017-03-20  Nick Clifton  <nickc@redhat.com>
+
+	* doc/as.texinfo (2byte): Note that if no expressions are present
+	the directive does nothing.  Emphasize that the output is
+	unaligned, and that this can have an effect on the relocations
+	generated.
+	(4byte): Simplify description.  Refer back to the 2byte
+	description.
+	(8byte): Likewise.
+
 2017-03-20  Richard Earnshaw  <rearnsha@arm.com>
 
 	* config/tc-arm.c (arm_fpus): Note entires that should not be
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 3b3e931..56a38bf 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -7345,10 +7345,19 @@ instead of zero.  Using @samp{.zero} in this way would be confusing however.
 @cindex two-byte integer
 @cindex integer, 2-byte
 
-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 expects zero or more expressions, separated by commas.  If there
+are no expressions then the directive does nothing.  Otherwise each expression
+is evaluated in turn and placed in the next two bytes of the current output
+section, using the endian model of the target.  If an expression will not fit
+in two bytes, a warning message is displayed and the least significant two
+bytes of the expression's value are used.  If an expression cannot be evaluated
+at assembly time then relocations will be generated in order to compute the
+value at link time.  
+
+This directive does not apply any alignment before or after inserting the
+values.  As a result of this, if relocations are generated, they may be
+different from those used for inserting values with a guaranteed alignment.
+
 This directive is only available for ELF targets,
 
 @node 4byte
@@ -7357,11 +7366,8 @@ This directive is only available for ELF targets,
 @cindex four-byte integer
 @cindex integer, 4-byte
 
-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,
+Like the @option{.2byte} directive, except that it inserts unaligned, four byte
+long values into the output.
 
 @node 8byte
 @section @code{.8byte @var{expression} [, @var{expression}]*}
@@ -7369,11 +7375,9 @@ This directive is only available for ELF targets,
 @cindex eight-byte integer
 @cindex integer, 8-byte
 
-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,
+Like the @option{.8byte} directive, except that it inserts unaligned, eight
+byte long bignum values into the output.
+
 @end ifset
 
 @node Deprecated


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]