fix time64 link regression of dlsym stub for static-linked programs
authorRich Felker <dalias@aerifal.cx>
Sun, 3 Nov 2019 06:19:01 +0000 (01:19 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 3 Nov 2019 06:19:01 +0000 (01:19 -0500)
in commit 22daaea39f1cc5f7391f0a5cd84576ffb58c2860, the
__dlsym_redir_time64 function providing the backend for __dlsym_time64
was defined only in the dynamic linker, and thus was undefined when
static linking a program referencing dlsym. use the same stub_dlsym
definition that provides __dlsym (the non-redirecting backend) for
static linked programs to provide it, conditional on _REDIR_TIME64.

src/ldso/__dlsym.c

index 8ac0a33491f6276227877fb8d2556fae3392e1e2..0384f97e96099259b918c2f9d52c618e41f37135 100644 (file)
@@ -8,3 +8,7 @@ static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict
 }
 
 weak_alias(stub_dlsym, __dlsym);
+
+#if _REDIR_TIME64
+weak_alias(stub_dlsym, __dlsym_redir_time64);
+#endif