Provides specific run-time resolution of a module's deferred symbols.
int loadbind(Flag, ExportPointer, ImportPointer) int Flag; void *ExportPointer, *ImportPointer;
The loadbind subroutine controls the run-time resolution of a previously loaded object module's unresolved imported symbols.
The loadbind subroutine is used when two modules are loaded. Module A, an object module loaded at run time with the load subroutine, has designated that some of its imported symbols be resolved at a later time. Module B contains exported symbols to resolve module A's unresolved imports.
To keep module A's imported symbols from being resolved until the loadbind service is called, you can specify the load subroutine flag, L_NOAUTODEFER, when loading module A.
(This paragraph only applies to AIX 4.3.1 and previous releases.) When a 32-bit process is executing under ptrace control, portions of the process's address space are recopied after the loadbind processing completes. The main program text (loaded in segment 1) and shared library modules (loaded in segment 13) are recopied. Any breakpoints or other modifications to these segments must be reinserted after the loadbind call.
(This paragraph only applies to AIX 4.3.2 and later releases.) When a 32-bit process executing under ptrace control calls loadbind, the debugger is notified by setting the W_SLWTED flag in the status returned by wait.
When a 64-bit process under ptrace control calls loadbind, the debugger is not notified and execution of the process being debugged continues normally.
Note: The ImportPointer or ExportPointer parameter may also be set to any exported static data area symbol or function pointer contained in the associated module. This would typically be the function pointer returned from the load of the specified module.
A 0 is returned if the loadbind subroutine is successful.
A -1 is returned if an error is detected, with the errno global variable set to an associated error code:
After an error is returned by the loadbind subroutine, you may also use the loadquery subroutine to obtain additional information about the loadbind error.
This subroutine is part of Base Operating System (BOS) Runtime.
The load subroutine, loadquery subroutine, unload subroutine.
The ld command.
Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.