From 86f65dffc2396d408beb628f1cad2b8f63e197bd Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 12 Jul 2020 06:04:53 -0700 Subject: ld.so: Add --list-tunables to print tunable values Pass --list-tunables to ld.so to print tunables with min and max values. Reviewed-by: Adhemerval Zanella --- elf/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'elf/Makefile') diff --git a/elf/Makefile b/elf/Makefile index c41d11693b..5e7f938e2d 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -45,6 +45,10 @@ dl-routines += dl-tunables tunables-type = $(addprefix TUNABLES_FRONTEND_,$(have-tunables)) CPPFLAGS-dl-tunables.c += -DTUNABLES_FRONTEND=$(tunables-type) +ifeq (yesyes,$(build-shared)$(run-built-tests)) +tests-special += $(objpfx)list-tunables.out +endif + # Make sure that the compiler does not insert any library calls in tunables # code paths. ifeq (yes,$(have-loop-to-function)) @@ -1896,3 +1900,10 @@ $(objpfx)tst-glibc-hwcaps-mask.out: \ # Generic dependency for sysdeps implementation of # tst-glibc-hwcaps-cache. $(objpfx)tst-glibc-hwcaps-cache.out: $(objpfx)tst-glibc-hwcaps + +$(objpfx)list-tunables.out: tst-rtld-list-tunables.sh $(objpfx)ld.so + $(SHELL) $< $(objpfx)ld.so '$(test-wrapper-env)' \ + '$(run_program_env)' > $(objpfx)/tst-rtld-list-tunables.out + cmp tst-rtld-list-tunables.exp \ + $(objpfx)/tst-rtld-list-tunables.out > $@; \ + $(evaluate-test) -- cgit 1.4.1