mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 06:10:06 +00:00
rtld: Fix handling of '--' option
It always resulted in the error `unrecognized option '--'` previously. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
942670c81d
commit
2227195794
16
elf/rtld.c
16
elf/rtld.c
@ -1501,12 +1501,16 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
_dl_version ();
|
||||
else if (_dl_argv[1][0] == '-' && _dl_argv[1][1] == '-')
|
||||
{
|
||||
if (_dl_argv[1][1] == '\0')
|
||||
/* End of option list. */
|
||||
break;
|
||||
else
|
||||
/* Unrecognized option. */
|
||||
_dl_usage (ld_so_name, _dl_argv[1]);
|
||||
if (_dl_argv[1][2] == '\0')
|
||||
{
|
||||
/* End of option list. */
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
break;
|
||||
}
|
||||
else
|
||||
/* Unrecognized option. */
|
||||
_dl_usage (ld_so_name, _dl_argv[1]);
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user