Changeset 5344:1fc66ca81759 in roaraudio


Ignore:
Timestamp:
12/10/11 00:08:10 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support lazy binding

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/roardl.h

    r5338 r5344  
    4242#define ROAR_DL_FLAG_NONE               0x0000 
    4343#define ROAR_DL_FLAG_STATIC             0x0001 /* plugins are linked statically -lfoo */ 
     44#define ROAR_DL_FLAG_LAZY               0x0002 
    4445 
    4546#define ROAR_DL_HANDLE_DEFAULT          ((struct roar_dl_lhandle*)(void*)0) 
  • libroar/roardl.c

    r5335 r5344  
    196196#if defined(ROAR_HAVE_LIBDL) 
    197197#ifdef RTLD_DEEPBIND 
    198  int libdl_flags = RTLD_NOW|RTLD_DEEPBIND; 
     198 int libdl_flags = RTLD_DEEPBIND; 
    199199#else 
    200  int libdl_flags = RTLD_NOW; 
     200 int libdl_flags = 0; 
    201201#endif 
    202202#endif 
     
    205205 if ( flags == ROAR_DL_FLAG_DEFAULTS ) 
    206206  flags = ROAR_DL_FLAG_NONE; 
     207 
     208#if defined(ROAR_HAVE_LIBDL) 
     209 if ( flags & ROAR_DL_FLAG_LAZY ) { 
     210  libdl_flags |= RTLD_LAZY; 
     211 } else { 
     212  libdl_flags |= RTLD_NOW; 
     213 } 
     214#endif 
    207215 
    208216 if ( (ret = roar_mm_malloc(sizeof(struct roar_dl_lhandle))) == NULL ) 
  • roarclients/roarpluginrunner.c

    r5341 r5344  
    9191 
    9292static int do_explain(const char * name) { 
    93  struct roar_dl_lhandle * lhandle = roar_dl_open(name, ROAR_DL_FLAG_DEFAULTS, 0, NULL); 
     93 struct roar_dl_lhandle * lhandle = roar_dl_open(name, ROAR_DL_FLAG_LAZY, 0, NULL); 
    9494 struct roar_dl_libraryinst * (*func)(struct roar_dl_librarypara * para); 
    9595 struct roar_dl_libraryinst * lib; 
Note: See TracChangeset for help on using the changeset viewer.