====== "attach" command ====== ===== Purpose ===== Load a plugin, or a set of plugins. ===== Syntax ===== {attach|load} [options] path ===== Comments ===== A file or directory is specified using a path. A path starting with ''/'' is absolute. A path starting with ''.'' is relative to the current working directory. Other paths refer to the first hit relative to a directory listed in GNUCAP_PLUGPATH. If the path specified refers to a directory, the attach command will load all files that match ''*.so'' inside this directory. A plugin file is attached by calling the system function ''dlopen''. The function is called with ''RTLD_LOCAL|RTLD_NOW'', and optional flags. See dlopen(3) for details. ===== Options ===== | public | Set RTLD_GLOBAL. Symbols defined in a plugin are global. | | lazy | Set RTLD_LAZY. Defer resolving symbols until needed. | ===== Examples ===== load ./myplugin.so Load a file in the current working directory load mgsim Load all plugins from "mgsim" (provided by modelgen-verilog) load ngspice43/bjt.so Load bjt device model from ngspice43 (provided by gnucap-models) ===== See also ===== Modelgen and Modelgen-Verilog may be used to turn device descriptions into loadable plugins. Most Gnucap related packages (official and inofficial) mainly consist of plugins. ===== Environment ===== GNUCAP_PLUGPATH, a colon separated list. This is normally managed automatically