* 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.
This commit is contained in:
Ian Lance Taylor 1996-10-09 19:45:29 +00:00
parent 961d589322
commit 458fc0567b
3 changed files with 41 additions and 13 deletions

View file

@ -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.

View file

@ -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
@ -931,6 +932,14 @@ option is only meaningful for certain processors, such as the Alpha.
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

View file

@ -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