* 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:
parent
961d589322
commit
458fc0567b
@ -1,5 +1,14 @@
|
|||||||
Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com>
|
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
|
* emultempl/pe.em (set_pe_subsystem): Record entry symbol for each
|
||||||
subsystem type. Ifdef out os2 type. Recognize a version number.
|
subsystem type. Ifdef out os2 type. Recognize a version number.
|
||||||
|
|
||||||
|
9
ld/ld.1
9
ld/ld.1
@ -123,6 +123,7 @@ ld \- the GNU linker
|
|||||||
.RB "[\|" \-warn\-constructors "\|]"
|
.RB "[\|" \-warn\-constructors "\|]"
|
||||||
.RB "[\|" \-warn\-multiple\-gp "\|]"
|
.RB "[\|" \-warn\-multiple\-gp "\|]"
|
||||||
.RB "[\|" \-warn\-once "\|]"
|
.RB "[\|" \-warn\-once "\|]"
|
||||||
|
.RB "[\|" \-warn\-section\-align "\|]"
|
||||||
.RB "[\|" \-\-whole\-archive "\|]"
|
.RB "[\|" \-\-whole\-archive "\|]"
|
||||||
.RB "[\|" \-\-no\-whole\-archive "\|]"
|
.RB "[\|" \-\-no\-whole\-archive "\|]"
|
||||||
.RB "[\|" "\-\-wrap\ "\c
|
.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
|
Only warn once for each undefined symbol, rather than once per module
|
||||||
which refers to it.
|
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
|
.TP
|
||||||
.B \-\-whole\-archive
|
.B \-\-whole\-archive
|
||||||
For each archive mentioned on the command line after the
|
For each archive mentioned on the command line after the
|
||||||
|
@ -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
|
supported. Display which input files can and cannot be opened. Display
|
||||||
the linker script if using a default builtin script.
|
the linker script if using a default builtin script.
|
||||||
|
|
||||||
@kindex -warn-comon
|
@kindex --warn-comon
|
||||||
@cindex warnings, on combining symbols
|
@cindex warnings, on combining symbols
|
||||||
@cindex combining symbols, warnings on
|
@cindex combining symbols, warnings on
|
||||||
@item -warn-common
|
@item --warn-common
|
||||||
Warn when a common symbol is combined with another common symbol or with
|
Warn when a common symbol is combined with another common symbol or with
|
||||||
a symbol definition. Unix linkers allow this somewhat sloppy practice,
|
a symbol definition. Unix linkers allow this somewhat sloppy practice,
|
||||||
but linkers on some other operating systems do not. This option allows
|
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.
|
a definition of the same variable.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The @samp{-warn-common} option can produce five kinds of warnings. Each
|
The @samp{--warn-common} option can produce five kinds of warnings.
|
||||||
warning consists of a pair of lines: the first describes the symbol just
|
Each warning consists of a pair of lines: the first describes the symbol
|
||||||
encountered, and the second describes the previous symbol encountered
|
just encountered, and the second describes the previous symbol
|
||||||
with the same name. One or both of the two symbols will be a common
|
encountered with the same name. One or both of the two symbols will be
|
||||||
symbol.
|
a common symbol.
|
||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
@ -1071,14 +1071,14 @@ encountered in a different order.
|
|||||||
@end smallexample
|
@end smallexample
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@kindex -warn-constructors
|
@kindex --warn-constructors
|
||||||
@item -warn-constructors
|
@item --warn-constructors
|
||||||
Warn if any global constructors are used. This is only useful for a few
|
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
|
object file formats. For formats like COFF or ELF, the linker can not
|
||||||
detect the use of global constructors.
|
detect the use of global constructors.
|
||||||
|
|
||||||
@kindex -warn-multiple-gp
|
@kindex --warn-multiple-gp
|
||||||
@item -warn-multiple-gp
|
@item --warn-multiple-gp
|
||||||
Warn if multiple global pointer values are required in the output file.
|
Warn if multiple global pointer values are required in the output file.
|
||||||
This is only meaningful for certain processors, such as the Alpha.
|
This is only meaningful for certain processors, such as the Alpha.
|
||||||
Specifically, some processors put large-valued constants in a special
|
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
|
values in order to be able to address all possible constants. This
|
||||||
option causes a warning to be issued whenever this case occurs.
|
option causes a warning to be issued whenever this case occurs.
|
||||||
|
|
||||||
@kindex -warn-once
|
@kindex --warn-once
|
||||||
@cindex warnings, on undefined symbols
|
@cindex warnings, on undefined symbols
|
||||||
@cindex undefined symbols, warnings on
|
@cindex undefined symbols, warnings on
|
||||||
@item -warn-once
|
@item --warn-once
|
||||||
Only warn once for each undefined symbol, rather than once per module
|
Only warn once for each undefined symbol, rather than once per module
|
||||||
which refers to it.
|
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
|
@kindex --whole-archive
|
||||||
@cindex including an entire archive
|
@cindex including an entire archive
|
||||||
@item --whole-archive
|
@item --whole-archive
|
||||||
|
Loading…
Reference in New Issue
Block a user