LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ltdl.h File Reference

#include <sys/types.h>

Include dependency graph for ltdl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lt_dlsymlist
struct  lt_dlinfo
struct  lt_user_dlloader

Defines

#define LTDL_H   1
#define LT_EOS_CHAR   '\0'
#define LT_BEGIN_C_DECLS
#define LT_END_C_DECLS
#define LT_PARAMS(protos)   ()
#define lt_ptr   char*
#define LT_STMT_START   do
#define LT_STMT_END   while (0)
#define LT_CONC(s, t)   s/**/t
#define LT_STRLEN(s)   (((s) && (s)[0]) ? strlen (s) : 0)
#define LT_PATHSEP_CHAR   ':'
#define LT_SCOPE   extern
#define LTDL_SET_PRELOADED_SYMBOLS()
#define lt_dlerror_table
#define LT_ERROR(name, diagnostic)   LT_CONC(LT_ERROR_, name),

Typedefs

typedef lt_dlhandle_structlt_dlhandle
typedef void lt_dlmutex_lock LT_PARAMS ((void))
typedef unsigned lt_dlcaller_id
typedef lt_dlloader lt_dlloader
typedef lt_ptr lt_user_data
typedef lt_ptr lt_module

Enumerations

enum  { name, LT_ERROR_MAX }

Functions

LT_SCOPE int lt_dlinit LT_PARAMS ((void))
LT_SCOPE int lt_dladdsearchdir LT_PARAMS ((const char *search_dir))
LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS ((const char *before, const char *search_dir))
LT_SCOPE int lt_dlsetsearchpath LT_PARAMS ((const char *search_path))
LT_SCOPE int lt_dlforeachfile LT_PARAMS ((const char *search_path, int(*func)(const char *filename, lt_ptr data), lt_ptr data))
LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS ((const char *filename))
LT_SCOPE lt_ptr lt_dlsym LT_PARAMS ((lt_dlhandle handle, const char *name))
LT_SCOPE int lt_dlclose LT_PARAMS ((lt_dlhandle handle))
LT_SCOPE int lt_dlmutex_register LT_PARAMS ((lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror))
LT_SCOPE lt_ptr lt_dlmalloc LT_PARAMS ((size_t size))
LT_SCOPE lt_ptr lt_dlrealloc LT_PARAMS ((lt_ptr ptr, size_t size))
LT_SCOPE void lt_dlfree LT_PARAMS ((lt_ptr ptr))
LT_SCOPE int lt_dlpreload LT_PARAMS ((const lt_dlsymlist *preloaded))
LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS ((lt_dlhandle place))
LT_SCOPE int lt_dlforeach LT_PARAMS ((int(*func)(lt_dlhandle handle, lt_ptr data), lt_ptr data))
LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS ((lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data))
LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS ((lt_dlcaller_id key, lt_dlhandle handle))
LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS ((lt_dlloader *place))
LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS ((const char *loader_name))
LT_SCOPE int lt_dlloader_add LT_PARAMS ((lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name))
LT_SCOPE int lt_dladderror LT_PARAMS ((const char *diagnostic))
LT_SCOPE int lt_dlseterror LT_PARAMS ((int errorcode))


Define Documentation

#define LT_BEGIN_C_DECLS
 

Definition at line 47 of file ltdl.h.

#define LT_CONC s,
 )     s/**/t
 

Definition at line 85 of file ltdl.h.

#define lt_dlerror_table
 

Value:

LT_ERROR(UNKNOWN,       "unknown error")      \
    LT_ERROR(DLOPEN_NOT_SUPPORTED,  "dlopen support not available") \
    LT_ERROR(INVALID_LOADER,      "invalid loader")     \
    LT_ERROR(INIT_LOADER,     "loader initialization failed") \
    LT_ERROR(REMOVE_LOADER,     "loader removal failed")    \
    LT_ERROR(FILE_NOT_FOUND,      "file not found")     \
    LT_ERROR(DEPLIB_NOT_FOUND,      "dependency library not found") \
    LT_ERROR(NO_SYMBOLS,      "no symbols defined")   \
    LT_ERROR(CANNOT_OPEN,     "can't open the module")    \
    LT_ERROR(CANNOT_CLOSE,      "can't close the module")   \
    LT_ERROR(SYMBOL_NOT_FOUND,      "symbol not found")     \
    LT_ERROR(NO_MEMORY,       "not enough memory")    \
    LT_ERROR(INVALID_HANDLE,      "invalid module handle")    \
    LT_ERROR(BUFFER_OVERFLOW,     "internal buffer overflow")   \
    LT_ERROR(INVALID_ERRORCODE,     "invalid errorcode")    \
    LT_ERROR(SHUTDOWN,        "library already shutdown")   \
    LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module")  \
    LT_ERROR(INVALID_MUTEX_ARGS,    "invalid mutex handler registration") \
    LT_ERROR(INVALID_POSITION,      "invalid search path insert position")

Definition at line 313 of file ltdl.h.

#define LT_END_C_DECLS
 

Definition at line 48 of file ltdl.h.

#define LT_EOS_CHAR   '\0'
 

Definition at line 38 of file ltdl.h.

Referenced by canonicalize_path(), find_file_callback(), lt_argz_insertdir(), lt_dlopenext(), trim(), and try_dlopen().

#define LT_ERROR name,
diagnostic   )     LT_CONC(LT_ERROR_, name),
 

#define LT_PARAMS protos   )     ()
 

Definition at line 61 of file ltdl.h.

Referenced by foreachfile_callback().

#define LT_PATHSEP_CHAR   ':'
 

Definition at line 124 of file ltdl.h.

Referenced by argzize_path(), canonicalize_path(), and lt_dlpath_insertdir().

#define lt_ptr   char*
 

Definition at line 62 of file ltdl.h.

Referenced by foreachfile_callback(), lt_dlcaller_get_data(), lt_dlcaller_set_data(), lt_dlsym(), lt_emalloc(), lt_erealloc(), llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), and sys_dl_sym().

#define LT_SCOPE   extern
 

Definition at line 139 of file ltdl.h.

#define LT_STMT_END   while (0)
 

Definition at line 76 of file ltdl.h.

#define LT_STMT_START   do
 

Definition at line 75 of file ltdl.h.

#define LT_STRLEN  )     (((s) && (s)[0]) ? strlen (s) : 0)
 

Definition at line 89 of file ltdl.h.

Referenced by canonicalize_path(), foreach_dirinpath(), list_files_by_dir(), load_deplibs(), lt_argz_insertdir(), lt_dlinsertsearchdir(), lt_dlopenext(), lt_dlsetsearchpath(), lt_dlsym(), lt_estrdup(), trim(), try_dlopen(), and tryall_dlopen_module().

#define LTDL_H   1
 

Definition at line 29 of file ltdl.h.

 
#define LTDL_SET_PRELOADED_SYMBOLS  ) 
 

Value:

LT_STMT_START{  \
  extern const lt_dlsymlist lt_preloaded_symbols[];   \
  lt_dlpreload_default(lt_preloaded_symbols);     \
            }LT_STMT_END

Definition at line 230 of file ltdl.h.


Typedef Documentation

typedef unsigned lt_dlcaller_id
 

Definition at line 256 of file ltdl.h.

typedef struct lt_dlhandle_struct* lt_dlhandle
 

Definition at line 153 of file ltdl.h.

typedef struct lt_dlloader lt_dlloader
 

Definition at line 270 of file ltdl.h.

typedef lt_ptr lt_module
 

Definition at line 272 of file ltdl.h.

typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data))
 

Definition at line 188 of file ltdl.h.

typedef lt_ptr lt_user_data
 

Definition at line 271 of file ltdl.h.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
name 
LT_ERROR_MAX 

Definition at line 335 of file ltdl.h.


Function Documentation

LT_SCOPE int lt_dlseterror LT_PARAMS (int errorcode)   ) 
 

LT_SCOPE int lt_dladderror LT_PARAMS (const char *diagnostic)   ) 
 

LT_SCOPE int lt_dlloader_add LT_PARAMS (lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name)   ) 
 

LT_SCOPE lt_dlloader* lt_dlloader_find LT_PARAMS (const char *loader_name)   ) 
 

LT_SCOPE lt_dlloader* lt_dlloader_next LT_PARAMS (lt_dlloader *place)   ) 
 

LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS (lt_dlcaller_id key, lt_dlhandle handle)   ) 
 

LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS (lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data)   ) 
 

LT_SCOPE int lt_dlforeach LT_PARAMS (int(*func)(lt_dlhandle handle, lt_ptr data), lt_ptr data)   ) 
 

LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS (lt_dlhandle place)   ) 
 

LT_SCOPE int lt_dlpreload LT_PARAMS (const lt_dlsymlist *preloaded)   ) 
 

LT_SCOPE void lt_dlfree LT_PARAMS (lt_ptr ptr)   ) 
 

LT_SCOPE lt_ptr lt_dlrealloc LT_PARAMS (lt_ptr ptr, size_t size)   ) 
 

LT_SCOPE lt_ptr lt_dlmalloc LT_PARAMS (size_t size)   ) 
 

LT_SCOPE int lt_dlmutex_register LT_PARAMS (lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror)   ) 
 

LT_SCOPE int lt_dlclose LT_PARAMS (lt_dlhandle handle)   ) 
 

LT_SCOPE lt_ptr lt_dlsym LT_PARAMS (lt_dlhandle handle, const char *name)   ) 
 

LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS (const char *filename)   ) 
 

LT_SCOPE int lt_dlforeachfile LT_PARAMS (const char *search_path, int(*func)(const char *filename, lt_ptr data), lt_ptr data)   ) 
 

LT_SCOPE int lt_dlsetsearchpath LT_PARAMS (const char *search_path)   ) 
 

LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS (const char *before, const char *search_dir)   ) 
 

LT_SCOPE int lt_dladdsearchdir LT_PARAMS (const char *search_dir)   ) 
 

LT_SCOPE int lt_dlinit LT_PARAMS (void)   )