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.
.RB "[\|" \-warn\-constructors "\|]"
.RB "[\|" \-warn\-multiple\-gp "\|]"
.RB "[\|" \-warn\-once "\|]"
+.RB "[\|" \-warn\-section\-align "\|]"
.RB "[\|" \-\-whole\-archive "\|]"
.RB "[\|" \-\-no\-whole\-archive "\|]"
.RB "[\|" "\-\-wrap\ "\c
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
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
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
@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
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