diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-10-08 10:57:10 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-10-08 15:00:39 +0200 |
commit | e0f1a58f3d1f4f55591b524e9dcff23cc98a509e (patch) | |
tree | cd744b7405d8793811595fc9d7020ef354e1e2d6 /elf/dl-main.h | |
parent | 27316f4a23efdc90bdfe4569a6c4b7e27941606e (diff) | |
download | glibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.tar.gz glibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.tar.xz glibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.zip |
elf: Implement ld.so --help
--help processing is deferred to the point where the executable has been loaded, so that it is possible to eventually include information from the main executable in the help output. As suggested in the GNU command-line interface guidelines, the help message is printed to standard output, and the exit status is successful. Handle usage errors closer to the GNU command-line interface guidelines. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-main.h')
-rw-r--r-- | elf/dl-main.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/dl-main.h b/elf/dl-main.h index 79c9c40056..ac7249a580 100644 --- a/elf/dl-main.h +++ b/elf/dl-main.h @@ -63,6 +63,7 @@ struct audit_list enum rtld_mode { rtld_mode_normal, rtld_mode_list, rtld_mode_verify, rtld_mode_trace, + rtld_mode_help, }; /* Aggregated state information extracted from environment variables @@ -101,6 +102,11 @@ call_init_paths (const struct dl_main_state *state) } /* Print ld.so usage information and exit. */ -_Noreturn void _dl_usage (void) attribute_hidden; +_Noreturn void _dl_usage (const char *argv0, const char *wrong_option) + attribute_hidden; + +/* Print ld.so --help output and exit. */ +_Noreturn void _dl_help (const char *argv0, struct dl_main_state *state) + attribute_hidden; #endif /* _DL_MAIN */ |