+ Added dl_info record

+ Added dladdr() prototype
 + Added RTLD_DEFAULT const for BSD and LINUX
 + Added RTLD_NEXT for all platforms

git-svn-id: trunk@5704 -
This commit is contained in:
chrivers 2006-12-25 12:22:19 +00:00
parent 5074c4c734
commit ed72c61524

View File

@ -13,10 +13,25 @@ Const
RTLD_NOW = $002;
RTLD_BINDING_MASK = $003;
RTLD_GLOBAL = $100;
RTLD_NEXT = pointer(-1);
{$ifdef LINUX}
RTLD_DEFAULT = nil;
{$endif}
{$ifdef BSD}
RTLD_DEFAULT = pointer(-2);
RTLD_MODEMASK = RTLD_BINDING_MASK;
{$endif}
type
Pdl_info = ^dl_info;
dl_info =
record
dli_fname : Pchar;
dli_fbase : pointer;
dli_sname : Pchar;
dli_saddr : pointer;
end;
Function dlopen(Name : PChar; Flags : longint) : Pointer; cdecl; external libdl;
FUnction dlsym(Lib : Pointer; Name : Pchar) : Pointer; cdecl; external Libdl;
Function dlclose(Lib : Pointer) : Longint; cdecl; external libdl;
@ -24,6 +39,7 @@ Function dlerror() : Pchar; cdecl; external libdl;
{ overloaded for compatibility with hmodule }
FUnction dlsym(Lib : PtrInt; Name : Pchar) : Pointer; cdecl; external Libdl;
Function dlclose(Lib : PtrInt) : Longint; cdecl; external libdl;
function dladdr(Lib: pointer; info: Pdl_info): Longint; cdecl; external; platform;
implementation