aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-04-09 16:06:48 +0000
committerNick Clifton <nickc@redhat.com>2009-04-09 16:06:48 +0000
commit0c71d7594b0e089d3ab0dbb805cfdcf512bb9ad2 (patch)
tree7767c1103357aa0373cf5e0949fd6b09122a407f
parent6a32d87432882fa1e7bcfca440b080d6667792c3 (diff)
downloadgdb-0c71d7594b0e089d3ab0dbb805cfdcf512bb9ad2.zip
gdb-0c71d7594b0e089d3ab0dbb805cfdcf512bb9ad2.tar.gz
gdb-0c71d7594b0e089d3ab0dbb805cfdcf512bb9ad2.tar.bz2
PR 9824
* ld.texinfo (Output Section Constraint): New node. Documents the ONLY_IF_RO and ONLY_IF_RW constraints. (Symbolic Constants): New node. Documents the CONSTANT operator.
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/ld.texinfo50
2 files changed, 55 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index f8f4940..d6c0bbd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-09 Nick Clifton <nickc@redhat.com>
+
+ PR 9824
+ * ld.texinfo (Output Section Constraint): New node. Documents the
+ ONLY_IF_RO and ONLY_IF_RW constraints.
+ (Symbolic Constants): New node. Documents the CONSTANT operator.
+
2009-04-09 Thilo Fischer <thilo.fischer@uni-muenster.de>
* emultempl/spuelf.em (embedded_spu_file): Use pex_one in place
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index ca460b3..5a88242 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -3556,7 +3556,10 @@ The full description of an output section looks like this:
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})]
+ [ALIGN(@var{section_align})]
+ [SUBALIGN(@var{subsection_align})]
+ [@var{constraint}]
@{
@var{output-section-command}
@var{output-section-command}
@@ -4158,10 +4161,14 @@ section named @samp{/DISCARD/} are not included in the output file.
@cindex output section attributes
We showed above that the full description of an output section looked
like this:
+
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})]
+ [ALIGN(@var{section_align})]
+ [SUBALIGN(@var{subsection_align})]
+ [@var{constraint}]
@{
@var{output-section-command}
@var{output-section-command}
@@ -4169,6 +4176,7 @@ like this:
@} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
@end group
@end smallexample
+
We've already described @var{section}, @var{address}, and
@var{output-section-command}. In this section we will describe the
remaining section attributes.
@@ -4178,6 +4186,7 @@ remaining section attributes.
* Output Section LMA:: Output section LMA
* Forced Output Alignment:: Forced Output Alignment
* Forced Input Alignment:: Forced Input Alignment
+* Output Section Constraint:: Output section constraint
* Output Section Region:: Output section region
* Output Section Phdr:: Output section phdr
* Output Section Fill:: Output section fill
@@ -4311,6 +4320,16 @@ You can force input section alignment within an output section by using
SUBALIGN. The value specified overrides any alignment given by input
sections, whether larger or smaller.
+@node Output Section Constraint
+@subsubsection Output Section Constraint
+@kindex ONLY_IF_RO
+@kindex ONLY_IF_RW
+@cindex constraints on output sections
+You can specify that an output section should only be created if all
+of its input sections are read-only or all of its input sections are
+read-write by using the keyword @code{ONLY_IF_RO} and
+@code{ONLY_IF_RW} respectively.
+
@node Output Section Region
@subsubsection Output Section Region
@kindex >@var{region}
@@ -4970,6 +4989,7 @@ expressions.
@menu
* Constants:: Constants
+* Symbolic Constants:: Symbolic constants
* Symbols:: Symbol Names
* Orphan Sections:: Orphan Sections
* Location Counter:: The Location Counter
@@ -5022,6 +5042,32 @@ _fourk_4 = 10000o;
Note - the @code{K} and @code{M} suffixes cannot be used in
conjunction with the base suffixes mentioned above.
+@node Symbolic Constants
+@subsection Symbolic Constants
+@cindex symbolic constants
+@kindex CONSTANT
+It is possible to refer to target specific constants via the use of
+the @code{CONSTANT(@var{name})} operator, where @var{name} is one of:
+
+@table @code
+@item MAXPAGESIZE
+@kindex MAXPAGESIZE
+The target's maximum page size.
+
+@item COMMONPAGESIZE
+@kindex COMMONPAGESIZE
+The target's default page size.
+@end table
+
+So for example:
+
+@smallexample
+ .text ALIGN (CONSTANT (MAXPAGESIZE)) : @{ *(.text) @}
+@end smallexample
+
+will create a text section aligned to the largest page boundary
+supported by the target.
+
@node Symbols
@subsection Symbol Names
@cindex symbol names