aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-05-21 10:59:12 +0000
committerNick Clifton <nickc@redhat.com>2008-05-21 10:59:12 +0000
commit41911f68522e3043ab6f32594eea32cdd8581a14 (patch)
treec0782ab42a52b61e524b3d54433deb7cfa84462a
parent7fac05361cfff456e6eb938cbc3817053dee3c54 (diff)
downloadfsf-binutils-gdb-41911f68522e3043ab6f32594eea32cdd8581a14.zip
fsf-binutils-gdb-41911f68522e3043ab6f32594eea32cdd8581a14.tar.gz
fsf-binutils-gdb-41911f68522e3043ab6f32594eea32cdd8581a14.tar.bz2
PR ld/6430
* ld.texinfo (--sort-common): Correct documentation to indicate that sorting is performed by alignment, not size, biggest alignment first.
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/NEWS8
-rw-r--r--ld/ld.texinfo18
3 files changed, 25 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b1c57f1..884cc96 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-21 Evandro Menezes <evandro@yahoo.com>
+
+ PR ld/6430
+ * ld.texinfo (--sort-common): Correct documentation to indicate
+ that sorting is performed by alignment, not size, biggest
+ alignment first.
+
2008-05-21 Christophe Lyon <christophe.lyon@st.com>
Nick Clifton <nickc@redhat.com>
diff --git a/ld/NEWS b/ld/NEWS
index f28d514..8c56d4e 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -298,9 +298,11 @@ Changes in version 2.7:
Changes in version 2.6:
* When an ELF section name is representable as a C identifier (this is not true
-of most ELF section names), the linker will automatically define symbols
-__start_SECNAME and __stop_SECNAME, where SECNAME is the section name, at the
-beginning and the end of the section. This is used by glibc.
+ of most ELF section names), *and* the section is not explicitly handled by
+ the linker script (ie it is an orphaned section) then the linker will
+ automatically PROVIDE symbols __start_SECNAME and __stop_SECNAME, where
+ SECNAME is the section name, at the beginning and the end of the section.
+ This is used by glibc.
* When an ELF section named .gnu.warning is encountered in an input file, the
contents of the section are displayed as an error message, and the section is
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 72d7a2a..acafbd3 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1620,11 +1620,11 @@ undefined symbols in the link.
@item --sort-common
@kindex --sort-common
-This option tells @command{ld} to sort the common symbols by size when it
-places them in the appropriate output sections. First come all the one
-byte symbols, then all the two byte, then all the four 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 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.
@kindex --sort-section name
@item --sort-section name
@@ -4706,6 +4706,14 @@ at the end of the file.
For ELF targets, the attribute of the section includes section type as
well as section flag.
+If an orphaned section's name is representable as a C identifier then
+the linker will automatically @xref{PROVIDE} two symbols:
+__start_SECNAME and __end_SECNAME, where SECNAME is the name of the
+section. These indicate the start address and end address of the
+orphaned section respectively. Note: most section names are not
+representable as C identifiers because they contain a @samp{.}
+character.
+
@node Location Counter
@subsection The Location Counter
@kindex .