class
Fiddle::Handle
v2_2_9 -
Show latest stable
- Superclass: Object
The Fiddle::Handle is the manner to access the dynamic library
Example
Setup
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so) => #<Fiddle::Handle:0x00000000d69ef8>
Setup, with flags
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) => #<Fiddle::Handle:0x00000000d69ef8>
See RTLD_LAZY and RTLD_GLOBAL
Addresses to symbols
strcpy_addr = @handle['strcpy'] => 140062278451968
or
strcpy_addr = @handle.sym('strcpy') => 140062278451968
Constants
DEFAULT = Document-const
NEXT = Document-const
RTLD_GLOBAL = Document-const: RTLD_GLOBAL\n\nrtld Fiddle:
RTLD_LAZY = Document-const: RTLD_LAZY\n\nrtld Fiddle:
RTLD_NOW = Document-const: RTLD_NOW\n\nrtld Fiddle:
Files
- ext/fiddle/closure.c