1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

elf: Implement ld.so --version

This prints out version information for the dynamic loader and
exits immediately, without further command line processing
(which seems to match what some GNU tools do).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2020-10-08 15:33:00 +02:00
parent addff78f1f
commit 542923d949
3 changed files with 20 additions and 0 deletions

View File

@ -1254,6 +1254,8 @@ dl_main (const ElfW(Phdr) *phdr,
--_dl_argc;
++_dl_argv;
}
else if (strcmp (_dl_argv[1], "--version") == 0)
_dl_version ();
else if (_dl_argv[1][0] == '-' && _dl_argv[1][1] == '-')
{
if (_dl_argv[1][1] == '\0')