ChangeLog rotatation and copyright year update
[deliverable/binutils-gdb.git] / gas / doc / c-hppa.texi
index 5fa535fd7834ea410ce21adf93f10225ccf797fd..e08d00f26d5bf96c062e3990aff5a1118765cfcb 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright (C) 1991-2015 Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @page
@@ -24,12 +24,12 @@ compilers.
 
 The format of the debugging sections has changed since the original
 @code{@value{AS}} port (version 1.3X) was released; therefore,
-you must rebuild all HPPA objects and libraries with the new 
+you must rebuild all HPPA objects and libraries with the new
 assembler so that you can debug the final executable.
 
 The HPPA @code{@value{AS}} port generates a small subset of the relocations
 available in the SOM and ELF object file formats.  Additional relocation
-support will be added as it becomes necessary.  
+support will be added as it becomes necessary.
 
 @node HPPA Options
 @section Options
@@ -88,7 +88,7 @@ described in the HP manual:
 @example
 .endm           .liston
 .enter          .locct
-.leave          .macro  
+.leave          .macro
 .listoff
 @end example
 
@@ -106,7 +106,7 @@ These are the additional directives in @code{@value{AS}} for the HPPA:
 @itemx .blockz @var{n}
 Reserve @var{n} bytes of storage, and initialize them to zero.
 
-@item .call 
+@item .call
 Mark the beginning of a procedure call.  Only the special case with @emph{no
 arguments} is allowed.
 
@@ -180,7 +180,7 @@ Define @var{name} as a label for the current assembly location.
 Not yet supported; the assembler rejects programs containing this directive.
 
 @item .origin @var{lc}
-Advance location counter to @var{lc}. Synonym for the @code{@value{as}}
+Advance location counter to @var{lc}. Synonym for the @code{@value{AS}}
 portable directive @code{.org}.
 
 @item .param @var{name} [ ,@var{typ} ]  [ ,@var{param}=@var{r} ]
@@ -244,14 +244,51 @@ identified by keywords.  The keywords recognized are @samp{quad=@var{expr}}
 beginning of this subsection; a power of two), @samp{access=@var{expr}} (value
 for ``access rights'' field), @samp{sort=@var{expr}} (sorting order for this
 subspace in link), @samp{code_only} (subsection contains only code),
-@samp{unloadable} (subsection cannot be loaded into memory), @samp{common}
-(subsection is common block), @samp{dup_comm} (initialized data may have
-duplicate names), or @samp{zero} (subsection is all zeros, do not write in
-object file).
+@samp{unloadable} (subsection cannot be loaded into memory), @samp{comdat}
+(subsection is comdat), @samp{common} (subsection is common block),
+@samp{dup_comm} (subsection may have duplicate names), or @samp{zero}
+(subsection is all zeros, do not write in object file).
 
 @code{.nsubspa} always creates a new subspace with the given name, even
 if one with the same name already exists.
 
+@samp{comdat}, @samp{common} and @samp{dup_comm} can be used to implement
+various flavors of one-only support when using the SOM linker.  The SOM
+linker only supports specific combinations of these flags.  The details
+are not documented.  A brief description is provided here.
+
+@samp{comdat} provides a form of linkonce support.  It is useful for
+both code and data subspaces.  A @samp{comdat} subspace has a key symbol
+marked by the @samp{is_comdat} flag or @samp{ST_COMDAT}.  Only the first
+subspace for any given key is selected.  The key symbol becomes universal
+in shared links.  This is similar to the behavior of @samp{secondary_def}
+symbols.
+
+@samp{common} provides Fortran named common support.  It is only useful
+for data subspaces.  Symbols with the flag @samp{is_common} retain this
+flag in shared links.  Referencing a @samp{is_common} symbol in a shared
+library from outside the library doesn't work.  Thus, @samp{is_common}
+symbols must be output whenever they are needed.
+
+@samp{common} and @samp{dup_comm} together provide Cobol common support.
+The subspaces in this case must all be the same length.  Otherwise, this
+support is similar to the Fortran common support.
+
+@samp{dup_comm} by itself provides a type of one-only support for code.
+Only the first @samp{dup_comm} subspace is selected.  There is a rather
+complex algorithm to compare subspaces.  Code symbols marked with the
+@samp{dup_common} flag are hidden.  This support was intended for "C++
+duplicate inlines".
+
+A simplified technique is used to mark the flags of symbols based on
+the flags of their subspace.  A symbol with the scope SS_UNIVERSAL and
+type ST_ENTRY, ST_CODE or ST_DATA is marked with the corresponding
+settings of @samp{comdat}, @samp{common} and @samp{dup_comm} from the
+subspace, respectively.  This avoids having to introduce additional
+directives to mark these symbols.  The HP assembler sets @samp{is_common}
+from @samp{common}.  However, it doesn't set the @samp{dup_common} from
+@samp{dup_comm}.  It doesn't have @samp{comdat} support.
+
 @item .version "@var{str}"
 Write @var{str} as version identifier in object code.
 @end table
@@ -259,5 +296,5 @@ Write @var{str} as version identifier in object code.
 @node HPPA Opcodes
 @section Opcodes
 For detailed information on the HPPA machine instruction set, see
-@cite{PA-RISC Architecture and Instruction Set Reference Manual} 
+@cite{PA-RISC Architecture and Instruction Set Reference Manual}
 (HP 09740-90039).
This page took 0.024201 seconds and 4 git commands to generate.