This is the mail archive of the binutils@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]

[PATCH] document ELF .local directive


The ".local" directive in GAS is not documented. I discovered this while comparing .lcomm with an alignment argument vs. using .comm with .local. GCC defaults to use the latter for ELF targets, so I thought it would be worth mentioning that idiom in connection with .local. Does this look OK? I tested it by running "make info" and "make pdf".

gas/ChangeLog/
2008-10-03  Bob Wilson  <bob.wilson@acm.org>

* doc/as.texinfo (Local): New description of ELF .local directive.
Index: doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.184
diff -u -r1.184 as.texinfo
--- doc/as.texinfo	24 Sep 2008 23:21:04 -0000	1.184
+++ doc/as.texinfo	4 Oct 2008 00:25:25 -0000
@@ -3877,6 +3877,9 @@
 * Ln::                          @code{.ln @var{line-number}}
 
 * LNS directives::              @code{.file}, @code{.loc}, etc.
+@ifset ELF
+* Local::                       @code{.local @var{names}}
+@end ifset
 
 * Long::                        @code{.long @var{expressions}}
 @ignore
@@ -5019,6 +5022,22 @@
 affects code assembled until the next @code{.mri} directive, or until the end
 of the file.  @xref{M, MRI mode, MRI mode}.
 
+@ifset ELF
+@node Local
+@section @code{.local @var{names}}
+
+@cindex @code{local} directive
+This directive, which is available for ELF targets, marks each symbol in
+the comma-separated list of @code{names} as a local symbol so that it
+will not be externally visible.  If the symbols do not already exist,
+they will be created.
+
+For targets where the @code{.lcomm} directive (@pxref{Lcomm}) does not
+accept an alignment argument, which is the case for most ELF targets,
+the @code{.local} directive can be used in combination with @code{.comm}
+(@pxref{Comm}) to define aligned local common data.
+@end ifset
+
 @node List
 @section @code{.list}
 

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