aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-main.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-10-08 10:57:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-10-08 15:00:39 +0200
commite0f1a58f3d1f4f55591b524e9dcff23cc98a509e (patch)
treecd744b7405d8793811595fc9d7020ef354e1e2d6 /elf/dl-main.h
parent27316f4a23efdc90bdfe4569a6c4b7e27941606e (diff)
downloadglibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.zip
glibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.tar.gz
glibc-e0f1a58f3d1f4f55591b524e9dcff23cc98a509e.tar.bz2
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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/dl-main.h b/elf/dl-main.h
index 79c9c40..ac7249a 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 */