Explorar o código

fix dlerror when using dlopen with a static libc

when the dynamic loader is disabled, dlopen fails correctly but dlerror
did not return a human readable error string like it should have.
Clément Vasseur %!s(int64=10) %!d(string=hai) anos
pai
achega
dc65fddd4c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/ldso/dynlink.c

+ 2 - 0
src/ldso/dynlink.c

@@ -1603,6 +1603,8 @@ static int invalid_dso_handle(void *h)
 }
 void *dlopen(const char *file, int mode)
 {
+	strcpy(errbuf, "Dynamic loading not supported");
+	errflag = 1;
 	return 0;
 }
 void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)