[ELF] Update help messages to prefer canonical name for some long options

And improve the help message for --pop-state.
This commit is contained in:
Fangrui Song 2022-01-06 00:43:46 -08:00
parent 0e5f258452
commit bfc2f4b122
4 changed files with 5 additions and 5 deletions

View File

@ -344,10 +344,10 @@ defm print_symbol_order: Eq<"print-symbol-order",
"Print a symbol order specified by --call-graph-ordering-file into the specified file">;
def pop_state: F<"pop-state">,
HelpText<"Undo the effect of -push-state">;
HelpText<"Restore the states saved by --push-state">;
def push_state: F<"push-state">,
HelpText<"Save the current state of -as-needed, -static and -whole-archive">;
HelpText<"Save the current state of --as-needed, -static and --whole-archive">;
def print_map: F<"print-map">,
HelpText<"Print a link map to the standard output">;

View File

@ -2171,7 +2171,7 @@ template <class ELFT> void Writer<ELFT>::checkExecuteOnly() {
if (!(isec->flags & SHF_EXECINSTR))
error("cannot place " + toString(isec) + " into " +
toString(osec->name) +
": -execute-only does not support intermingling data and code");
": --execute-only does not support intermingling data and code");
}
// The linker is expected to define SECNAME_start and SECNAME_end

View File

@ -486,7 +486,7 @@ Save the current state of
and
.Fl -whole-archive.
.It Fl -pop-state
Undo the effect of
Restore the states saved by
.Fl -push-state.
.It Fl -relocatable , Fl r
Create relocatable object file.

View File

@ -16,7 +16,7 @@
// RUN: }" > %t.lds
// RUN: ld.lld -T%t.lds %t.o -o %t -execute-only 2>&1
// CHECK: cannot place {{.*}}:(.rodata.foo) into .text: -execute-only does not support intermingling data and code
// CHECK: cannot place {{.*}}:(.rodata.foo) into .text: --execute-only does not support intermingling data and code
br lr