From c363b02443360c8c9a7850cba43b75bc81be75b1 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@cloudius-systems.com>
Date: Mon, 18 Mar 2013 16:13:02 +0100
Subject: [PATCH] add a dlfcn() stub

---
 libc/dlfcn.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libc/dlfcn.cc b/libc/dlfcn.cc
index d969b746e..472818fe5 100644
--- a/libc/dlfcn.cc
+++ b/libc/dlfcn.cc
@@ -1,6 +1,7 @@
 #include <dlfcn.h>
 #include "elf.hh"
 #include <link.h>
+#include <osv/debug.h>
 
 void* dlopen(const char* filename, int flags)
 {
@@ -57,3 +58,10 @@ int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *info,
     });
     return ret;
 }
+
+extern "C" int dladdr(__const void *addr, Dl_info *info)
+{
+    kprintf("stub dladdr()\n");
+    errno = EINVAL;
+    return -1;
+}
-- 
GitLab