diff options
author | Nick Clifton <nickc@redhat.com> | 2008-05-31 16:35:56 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-05-31 16:35:56 +0000 |
commit | de7dd2bdee702cd4a187c09427bd42b7eee239ec (patch) | |
tree | 40d84aa2c577867c71021aeb9f0ddc5bc74c6614 /ld/ld.texinfo | |
parent | c7eb6be45e424188fd6f1035ca747f4295f2588c (diff) | |
download | gdb-de7dd2bdee702cd4a187c09427bd42b7eee239ec.zip gdb-de7dd2bdee702cd4a187c09427bd42b7eee239ec.tar.gz gdb-de7dd2bdee702cd4a187c09427bd42b7eee239ec.tar.bz2 |
PR ld/6430
* testsuite/ld-elfcomm/elfcomm.exp (test_sort_common): Test the
ascending/descending argument to the --sort-common command line
option.
* testsuite/ld-elfcomm/sort-common.s: New file.
* ld.h (enum sort_order): New.
* ldlang.c (lang_check: Fix comment.
(lang_common): Sort commons in ascending or descending order.
(lang_one_common): Likewise.
* lexsup.c (ld_options): Have --sort-common take an option
argument.
(parse_args): Handle argument to --sort-common.
* ld.texinfo (--sort-common): Document new optional argument.
* NEWS: Mention new feature.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index f4a3473..a2ec34a 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -1622,13 +1622,14 @@ and SunOS platforms. On SunOS, the linker will automatically create a shared library if the @option{-e} option is not used and there are undefined symbols in the link. -@item --sort-common +@item --sort-common [= ascending | descending] @kindex --sort-common -This option tells @command{ld} to sort the common symbols by alignment when -it places them in the appropriate output sections. First come all the -sixteen-byte aligned symbols, then all the eight-byte, then all the -four-byte, then all the two-byte, and then everything else. This is to -prevent gaps between symbols due to alignment constraints. +This option tells @command{ld} to sort the common symbols by alignment in +ascending or descending order when it places them in the appropriate output +sections. The symbol alignments considered are sixteen-byte or larger, +eight-byte, four-byte, two-byte, and one-byte. This is to prevent gaps +between symbols due to alignment constraints. If no sorting order is +specified, then descending order is assumed. @kindex --sort-section name @item --sort-section name |