ldconfig: use libexec/rtld-elf/rtld_paths.h

instead of duplicating definitions using slighly different macro names.

Reviewed by:	emaste
Tested by:	jbeich
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
This commit is contained in:
Konstantin Belousov 2021-11-19 05:45:31 +02:00
parent f340188625
commit af91158706
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@
PACKAGE=runtime
PROG= ldconfig
SRCS= elfhints.c ldconfig.c
CFLAGS+= -I${SRCTOP}/libexec/rtld-elf
MAN= ldconfig.8
.include <bsd.prog.mk>

View File

@ -48,6 +48,7 @@
#include <unistd.h>
#include "ldconfig.h"
#include "rtld_paths.h"
#define _PATH_LD32_HINTS "/var/run/ld32.so.hints"
#define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints"
@ -84,7 +85,7 @@ main(int argc, char **argv)
}
if (is_soft)
hints_file = _PATH_ELFSOFT_HINTS;
hints_file = _PATH_SOFT_ELF_HINTS;
else if (is_32)
hints_file = _PATH_ELF32_HINTS;
else