diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2007-06-18 12:38:22 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2007-06-18 12:38:22 +0000 |
commit | 362c1d1a0446425c24bb3ea8738b3d3d56344228 (patch) | |
tree | ded9c05175ee5950cbbed0c71356d7b58457e21c /ld/ld.texinfo | |
parent | 42ba7415ccca9cf6b16c7127362b665cd312be63 (diff) | |
download | fsf-binutils-gdb-362c1d1a0446425c24bb3ea8738b3d3d56344228.zip fsf-binutils-gdb-362c1d1a0446425c24bb3ea8738b3d3d56344228.tar.gz fsf-binutils-gdb-362c1d1a0446425c24bb3ea8738b3d3d56344228.tar.bz2 |
* ldlex.l, ldgram.y: Add ALIGNOF.
* ldexp.c (exp_print_token, foldname): Likewise.
* ld.texinfo: Likewise.
ld/testsuite/
* ld-scripts/alignof.s: New.
* ld-scripts/alignof.t: New
* ld-scripts/alignof.exp: New.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 84d03ac..71273f4 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -4995,6 +4995,25 @@ of @code{ALIGN} is used to defines the value of a symbol. The builtin function @code{NEXT} is closely related to @code{ALIGN}. +@item ALIGNOF(@var{section}) +@kindex ALIGNOF(@var{section}) +@cindex section alignment +Return the alignment in bytes of the named @var{section}, if that section has +been allocated. If the section has not been allocated when this is +evaluated, the linker will report an error. In the following example, +the alignment of the @code{.output} section is stored as the first +value in that section. +@smallexample +@group +SECTIONS@{ @dots{} + .output @{ + LONG (ALIGNOF (.output)) + @dots{} + @} +@dots{} @} +@end group +@end smallexample + @item BLOCK(@var{exp}) @kindex BLOCK(@var{exp}) This is a synonym for @code{ALIGN}, for compatibility with older linker |