[pypy-issue] [issue1641] FreeBSD and dlopen: not possible with statically linked binaries

Tobias Oberstein tracker at bugs.pypy.org
Mon Nov 18 10:40:44 CET 2013


Tobias Oberstein <tobias.oberstein at gmail.com> added the comment:

Here is proof:

[bbslave_pypy at tavendo-freebsd-9 ~]$ cat test.c
#include <stdio.h>
#include <dlfcn.h>

int main() {
   printf("hello\n");
   void* p = dlopen("/usr/lib/libssl.so", RTLD_NOW);
   char* e = dlerror();
   if (e) {
      printf(e);
      printf("\n");
   } else {
      printf("success\n");
   }
}
[bbslave_pypy at tavendo-freebsd-9 ~]$ gcc test.c -o test
[bbslave_pypy at tavendo-freebsd-9 ~]$ ./test
hello
success
[bbslave_pypy at tavendo-freebsd-9 ~]$ gcc -static test.c -o test
[bbslave_pypy at tavendo-freebsd-9 ~]$ ./test
hello
Service unavailable
[bbslave_pypy at tavendo-freebsd-9 ~]$

----------
status: resolved -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1641>
________________________________________


More information about the pypy-issue mailing list