URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID9
Нить номер: 603
[ Назад ]

Исходное сообщение
"dlopen... using 'so'"

Отправлено uin , 21-Мрт-02 13:33 
// ...

void * _h = dlopen(some_dir, lazy);

if (!_h)
   const char * _e = dlerror();

// ...

_e = "Service Unavailable"... What does it mean ?


Содержание

Сообщения в этом обсуждении
"RE: dlopen... using 'so'"
Отправлено Арлекин , 21-Мрт-02 13:47 
System ?

"FreeBSD 4.4"
Отправлено uin , 21-Мрт-02 14:04 
Is It important ?


"RE: FreeBSD 4.4"
Отправлено Арлекин , 21-Мрт-02 14:31 
Can appear and it is important. Check up, whether is in system ld.so.1 and whether it is accessible. And test up call dlopen with direct path to lib:
dlopen( "path/name", RTLD_LAZY );

NOTE: It SunSolaris syntax.


"the same result"
Отправлено uin , 21-Мрт-02 15:06 
void * _hw = dlopen("abs path to libm.so & some other so's", RTLD_LAZY);

if (!_hw) const char * _er = dlerror();

_er = "service unavailable". what's the trouble?


"RE: the same result"
Отправлено Арлекин , 21-Мрт-02 15:40 
Completely not clear situation. We read man:
$ man dlerror
Reformatting page.  Wait... done
Miscellaneous Library Functions                       dlerror(3X)
NAME
     dlerror - get diagnostic information
SYNOPSIS
     cc [ flag ... ] file ...  -ldl [library ...]
     #include <dlfcn.h>
     char *dlerror(void);

DESCRIPTION
     dlerror() is one of a family of routines that give the user direct access to the dynamic linking facilities. (See Linker and Libraries Guide).  These routines are made available via  the  library  loaded  when  the option -ldl is passed to the link-editor.
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
     Note:  These routines are  available  to dynamically-linked processes ONLY.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here it is told, that THESE ROUTTINES ARE accessible, if the module is linked for DSO execution.
DIAGNOSIS:
1. If at link's keys -ldl were specified and
2. ld.so.1 on a place
I DO NOT KNOW that it can be.
Sorry.


"solution"
Отправлено uin , 21-Мрт-02 18:33 
-static prevents from loading any 'so'... easy & perfect... but thank u at all