diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-02-20 15:31:10 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2004-02-20 15:31:10 +0000 |
commit | 876f40905a27ef106554f894321b23d8130e9ffc (patch) | |
tree | eda3fbb1695ae2a4858e9055b07078e3842b17b2 /ld/ld.texinfo | |
parent | 627fe3fb790fa71dea2b5699f4e23bbbcf184d5f (diff) | |
download | gdb-876f40905a27ef106554f894321b23d8130e9ffc.zip gdb-876f40905a27ef106554f894321b23d8130e9ffc.tar.gz gdb-876f40905a27ef106554f894321b23d8130e9ffc.tar.bz2 |
* ldgram.y (exp): Add two operand ALIGN.
* ldexp.c (fold_binary): Add ALIGN_K case.
* ld.texinfo (ALIGN): Document two operand version.
* ld-scripts/align.{s,t,exp}: New.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index ed7b3d1..55f861e 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -4383,17 +4383,25 @@ SECTIONS @{ @dots{} @end group @end smallexample -@item ALIGN(@var{exp}) -@kindex ALIGN(@var{exp}) +@item ALIGN(@var{align}) +@itemx ALIGN(@var{exp},@var{align}) +@kindex ALIGN(@var{align}) +@kindex ALIGN(@var{exp},@var{align}) @cindex round up location counter @cindex align location counter -Return the location counter (@code{.}) aligned to the next @var{exp} -boundary. -@code{ALIGN} doesn't change the value of the location counter---it just -does arithmetic on it. Here is an example which aligns the output -@code{.data} section to the next @code{0x2000} byte boundary after the -preceding section and sets a variable within the section to the next -@code{0x8000} boundary after the input sections: +@cindex round up expression +@cindex align expression +Return the location counter (@code{.}) or arbitrary expression aligned +to the next @var{align} boundary. The single operand @code{ALIGN} +doesn't change the value of the location counter---it just does +arithmetic on it. The two operand @code{ALIGN} allows an arbitrary +expression to be aligned upwards (@code{ALIGN(@var{align})} is +equivalent to @code{ALIGN(., @var{align})}). + +Here is an example which aligns the output @code{.data} section to the +next @code{0x2000} byte boundary after the preceding section and sets a +variable within the section to the next @code{0x8000} boundary after the +input sections: @smallexample @group SECTIONS @{ @dots{} |