Type:
Class
Constants:
NEXT
:
Document-const
NEXT
A predefined pseudo-handle of RTLD_NEXT
Which will find the next occurrence of a function in the search order after the current library.
DEFAULT
:
Document-const
DEFAULT
A predefined pseudo-handle of RTLD_DEFAULT
Which will find the first occurrence of the desired symbol using the default library search order
The DL::Handle is the manner to access the dynamic library
Example
Setup
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = DL::Handle.new(libc_so) => #<DL::Handle:0x00000000d69ef8>
Setup, with flags
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = DL::Handle.new(libc_so, DL::RTLD_LAZY | DL::RTLD_GLOBAL) => #<DL::Handle:0x00000000d69ef8>
Addresses to symbols
strcpy_addr = @handle['strcpy'] => 140062278451968
or
strcpy_addr = @handle.sym('strcpy') => 140062278451968