aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-10-09 19:45:29 +0000
committerIan Lance Taylor <ian@airs.com>1996-10-09 19:45:29 +0000
commit458fc0567b58a90a9fbead52d080d66847979a97 (patch)
tree7986f0067e5f160140c90e4926f046268ba1731e /ld
parent961d589322ffa5f67f0353371e6e58fc28e0bcfb (diff)
downloadgdb-458fc0567b58a90a9fbead52d080d66847979a97.zip
gdb-458fc0567b58a90a9fbead52d080d66847979a97.tar.gz
gdb-458fc0567b58a90a9fbead52d080d66847979a97.tar.bz2
* ld.h (ld_config_type): Add warn_section_align field.
* lexsup.c (OPTION_WARN_SECTION_ALIGN): Define. (ld_options): Add --warn-section-align. (parse_args): Handle --warn-section-align. * ldlang.c (lang_size_sections): If warn_section_align, warn if the start of a section changes due to alignment. * ld.texinfo, ld.1: Document --warn-section-align. * ld.texinfo: Change some single dashes to double dashes. PR 10739.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/ld.19
-rw-r--r--ld/ld.texinfo36
3 files changed, 41 insertions, 13 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3f7b512..a6458d1 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,14 @@
Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * ld.h (ld_config_type): Add warn_section_align field.
+ * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define.
+ (ld_options): Add --warn-section-align.
+ (parse_args): Handle --warn-section-align.
+ * ldlang.c (lang_size_sections): If warn_section_align, warn if
+ the start of a section changes due to alignment.
+ * ld.texinfo, ld.1: Document --warn-section-align.
+ * ld.texinfo: Change some single dashes to double dashes.
+
* emultempl/pe.em (set_pe_subsystem): Record entry symbol for each
subsystem type. Ifdef out os2 type. Recognize a version number.
diff --git a/ld/ld.1 b/ld/ld.1
index ef3633e..10fcf7e 100644
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -123,6 +123,7 @@ ld \- the GNU linker
.RB "[\|" \-warn\-constructors "\|]"
.RB "[\|" \-warn\-multiple\-gp "\|]"
.RB "[\|" \-warn\-once "\|]"
+.RB "[\|" \-warn\-section\-align "\|]"
.RB "[\|" \-\-whole\-archive "\|]"
.RB "[\|" \-\-no\-whole\-archive "\|]"
.RB "[\|" "\-\-wrap\ "\c
@@ -932,6 +933,14 @@ Only warn once for each undefined symbol, rather than once per module
which refers to it.
.TP
+.B \-warn\-section\-align
+Warn if the address of an output section is changed because of
+alignment. Typically, the alignment will be set by an input section.
+The address will only be changed if it not explicitly specified; that
+is, if the SECTIONS command does not specify a start address for the
+section.
+
+.TP
.B \-\-whole\-archive
For each archive mentioned on the command line after the
.B \-\-whole\-archive
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index ad2a640..9e086d9 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -986,10 +986,10 @@ Display the version number for @code{ld} and list the linker emulations
supported. Display which input files can and cannot be opened. Display
the linker script if using a default builtin script.
-@kindex -warn-comon
+@kindex --warn-comon
@cindex warnings, on combining symbols
@cindex combining symbols, warnings on
-@item -warn-common
+@item --warn-common
Warn when a common symbol is combined with another common symbol or with
a symbol definition. Unix linkers allow this somewhat sloppy practice,
but linkers on some other operating systems do not. This option allows
@@ -1018,11 +1018,11 @@ size. The linker turns a common symbol into a declaration, if there is
a definition of the same variable.
@end table
-The @samp{-warn-common} option can produce five kinds of warnings. Each
-warning consists of a pair of lines: the first describes the symbol just
-encountered, and the second describes the previous symbol encountered
-with the same name. One or both of the two symbols will be a common
-symbol.
+The @samp{--warn-common} option can produce five kinds of warnings.
+Each warning consists of a pair of lines: the first describes the symbol
+just encountered, and the second describes the previous symbol
+encountered with the same name. One or both of the two symbols will be
+a common symbol.
@enumerate
@item
@@ -1071,14 +1071,14 @@ encountered in a different order.
@end smallexample
@end enumerate
-@kindex -warn-constructors
-@item -warn-constructors
+@kindex --warn-constructors
+@item --warn-constructors
Warn if any global constructors are used. This is only useful for a few
object file formats. For formats like COFF or ELF, the linker can not
detect the use of global constructors.
-@kindex -warn-multiple-gp
-@item -warn-multiple-gp
+@kindex --warn-multiple-gp
+@item --warn-multiple-gp
Warn if multiple global pointer values are required in the output file.
This is only meaningful for certain processors, such as the Alpha.
Specifically, some processors put large-valued constants in a special
@@ -1091,13 +1091,23 @@ large programs, it is often necessary to use multiple global pointer
values in order to be able to address all possible constants. This
option causes a warning to be issued whenever this case occurs.
-@kindex -warn-once
+@kindex --warn-once
@cindex warnings, on undefined symbols
@cindex undefined symbols, warnings on
-@item -warn-once
+@item --warn-once
Only warn once for each undefined symbol, rather than once per module
which refers to it.
+@kindex --warn-section-align
+@cindex warnings, on section alignment
+@cindex section alignment, warnings on
+@item --warn-section-align
+Warn if the address of an output section is changed because of
+alignment. Typically, the alignment will be set by an input section.
+The address will only be changed if it not explicitly specified; that
+is, if the @code{SECTIONS} command does not specify a start address for
+the section (@pxref{SECTIONS}).
+
@kindex --whole-archive
@cindex including an entire archive
@item --whole-archive