Blame elf/dl-usage.c

Packit Service 6f4a0d
/* Print usage information and help for ld.so.
Packit Service 6f4a0d
   Copyright (C) 1995-2020 Free Software Foundation, Inc.
Packit Service 6f4a0d
   This file is part of the GNU C Library.
Packit Service 6f4a0d
Packit Service 6f4a0d
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 6f4a0d
   modify it under the terms of the GNU Lesser General Public
Packit Service 6f4a0d
   License as published by the Free Software Foundation; either
Packit Service 6f4a0d
   version 2.1 of the License, or (at your option) any later version.
Packit Service 6f4a0d
Packit Service 6f4a0d
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 6f4a0d
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 6f4a0d
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 6f4a0d
   Lesser General Public License for more details.
Packit Service 6f4a0d
Packit Service 6f4a0d
   You should have received a copy of the GNU Lesser General Public
Packit Service 6f4a0d
   License along with the GNU C Library; if not, see
Packit Service 6f4a0d
   <https://www.gnu.org/licenses/>.  */
Packit Service 6f4a0d
Packit Service 6f4a0d
#include <dl-cache.h>
Packit Service 6f4a0d
#include <dl-main.h>
Packit Service 6f4a0d
#include <ldsodefs.h>
Packit Service 113913
#include <unistd.h>
Packit Service 6f4a0d
Packit Service 6f4a0d
void
Packit Service 113913
_dl_usage (const char *argv0, const char *wrong_option)
Packit Service 6f4a0d
{
Packit Service 113913
  if (wrong_option != NULL)
Packit Service 113913
    _dl_error_printf ("%s: unrecognized option '%s'\n", argv0, wrong_option);
Packit Service 113913
  else
Packit Service 113913
    _dl_error_printf ("%s: missing program name\n", argv0);
Packit Service 113913
  _dl_error_printf ("Try '%s --help' for more information.\n", argv0);
Packit Service 113913
  _exit (EXIT_FAILURE);
Packit Service 113913
}
Packit Service 113913
Packit Service 113913
void
Packit Service 113913
_dl_help (const char *argv0, struct dl_main_state *state)
Packit Service 113913
{
Packit Service 113913
  _dl_printf ("\
Packit Service 113913
Usage: %s [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]\n\
Packit Service 6f4a0d
You have invoked `ld.so', the helper program for shared library executables.\n\
Packit Service 6f4a0d
This program usually lives in the file `/lib/ld.so', and special directives\n\
Packit Service 6f4a0d
in executable files using ELF shared libraries tell the system's program\n\
Packit Service 6f4a0d
loader to load the helper program from this file.  This helper program loads\n\
Packit Service 6f4a0d
the shared libraries needed by the program executable, prepares the program\n\
Packit Service 6f4a0d
to run, and runs it.  You may invoke this helper program directly from the\n\
Packit Service 6f4a0d
command line to load and run an ELF executable file; this is like executing\n\
Packit Service 6f4a0d
that file itself, but always uses this helper program from the file you\n\
Packit Service 6f4a0d
specified, instead of the helper program file specified in the executable\n\
Packit Service 6f4a0d
file you run.  This is mostly of use for maintainers to test new versions\n\
Packit Service 6f4a0d
of this helper program; chances are you did not intend to run this program.\n\
Packit Service 6f4a0d
\n\
Packit Service 6f4a0d
  --list                list all dependencies and how they are resolved\n\
Packit Service 6f4a0d
  --verify              verify that given object really is a dynamically linked\n\
Packit Service 6f4a0d
                        object we can handle\n\
Packit Service 6f4a0d
  --inhibit-cache       Do not use " LD_SO_CACHE "\n\
Packit Service 6f4a0d
  --library-path PATH   use given PATH instead of content of the environment\n\
Packit Service 6f4a0d
                        variable LD_LIBRARY_PATH\n\
Packit Service 6f4a0d
  --inhibit-rpath LIST  ignore RUNPATH and RPATH information in object names\n\
Packit Service 6f4a0d
                        in LIST\n\
Packit Service 6f4a0d
  --audit LIST          use objects named in LIST as auditors\n\
Packit Service 6f4a0d
  --preload LIST        preload objects named in LIST\n\
Packit Service 113913
  --argv0 STRING        set argv[0] to STRING before running\n\
Packit Service 113913
  --help                display this help and exit\n\
Packit Service 113913
",
Packit Service 113913
              argv0);
Packit Service 113913
  _exit (EXIT_SUCCESS);
Packit Service 6f4a0d
}