# utils.binary Binary utility modules. ## utils.binary.deplibs Get dependent libraries. ### Function Prototype ::: tip API ```lua local deps = deplibs(binaryfile: , opt: ) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | opt | Optional. Options:
- `plat`: Platform
- `arch`: Architecture
- `recursive`: Recursively get all sub-dependencies (default: false)
- `resolve_path`: Try to resolve the file full path (default: false)
- `resolve_hint_paths`: Resolve paths from hints
- `resolve_search_paths`: Search library paths (e.g. LD_LIBRARY_PATH)
- `check_cycle`: Check for circular dependencies | ### Return Value | Return Value | Description | |--------------|-------------| | `
` | Dependent libraries list | ## utils.binary.readsyms Read symbols from object file. ### Function Prototype ::: tip API ```lua local syms = readsyms(binaryfile: ) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input object file path | ### Return Value | Return Value | Description | |--------------|-------------| | `
` | Symbols list | ## utils.binary.extractlib Extract static library to directory. ### Function Prototype ::: tip API ```lua extractlib(libraryfile: , outputdir: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | libraryfile | Required. Input static library file path | | outputdir | Required. Output directory path | | opt | Optional. Options | ## utils.binary.rpath.list Get rpath list. ### Function Prototype ::: tip API ```lua local rpaths = rpath.list(binaryfile: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | opt | Optional. Options | ### Return Value | Return Value | Description | |--------------|-------------| | `
` | Rpath list | ## utils.binary.rpath.insert Insert rpath. ### Function Prototype ::: tip API ```lua rpath.insert(binaryfile: , rpath_path: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | rpath_path | Required. Rpath path to insert | | opt | Optional. Options | ## utils.binary.rpath.change Change rpath. ### Function Prototype ::: tip API ```lua rpath.change(binaryfile: , rpath_old: , rpath_new: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | rpath_old | Required. Old rpath path | | rpath_new | Required. New rpath path | | opt | Optional. Options | ## utils.binary.rpath.remove Remove rpath. ### Function Prototype ::: tip API ```lua rpath.remove(binaryfile: , rpath_path: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | rpath_path | Required. Rpath path to remove | | opt | Optional. Options | ## utils.binary.rpath.clean Clean all rpaths. ### Function Prototype ::: tip API ```lua rpath.clean(binaryfile: , opt:
) ``` ::: ### Parameter Description | Parameter | Description | |-----------|-------------| | binaryfile | Required. Input binary file path | | opt | Optional. Options |