Default action for ldconfig is specified as -R AKA 'append', and for no-args (without options changing default actions), ldconfig should append empty list of directories to current list. But because the check was done before options were parsed out, presence of any option turned off default rescan. As result, innocently-looked commands like `ldconfig -v' were interpreted as setting directory hints list to one specified on the command line, i.e. empty. Reported by: https://github.com/mesonbuild/meson/issues/9592
Other changes
ldconfig: use libexec/rtld-elf/rtld_paths.h instead of duplicating definitions using slighly different macro names.
rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally
ldconfig: start of cleanup Use bool. Use local variables instead of static. Remove non-functional debugging override of hints file path. Use explicit exit() instead of return from main. Minor style tweaks.
ldconfig(8): nostd/-s does nothing Remove the option from man page and summary. Silently ignore it when parsing command line for backward compatibility.