From a23c28ec0d1cd67d25972181f613ef6dbfe4e299 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 2 Jun 2021 07:32:20 +0200 Subject: dlfcn: Move dlerror into libc The symbol was moved using scripts/move-symbol-to-libc.py. There is a minor functionality enhancement: dlerror now sets errno if it was set as part of the exception. (This is the result of using %m in asprintf, to avoid the strerror PLT call.) The previous errno value upon function return was unpredictable. Documenting this as a feature is premature; we need to make sure that the error codes are meaningful when they are set by the dynamic loader. Reviewed-by: Adhemerval Zanella --- dlfcn/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dlfcn/Makefile') diff --git a/dlfcn/Makefile b/dlfcn/Makefile index 994a3afee6..b194762d3e 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -21,11 +21,13 @@ include ../Makeconfig headers := bits/dlfcn.h dlfcn.h extra-libs := libdl -libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \ +libdl-routines := dlopen dlclose dlsym dlvsym dladdr dladdr1 dlinfo \ dlmopen dlfcn routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines))) elide-routines.os := $(routines) -routines += libc_dlerror_result +routines += \ + dlerror \ + libc_dlerror_result \ extra-libs-others := libdl -- cgit v1.2.3