mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@516 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
63438f9984
commit
bf9d5829f2
2 changed files with 9 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
|||
|
||||
NSBundle problems:
|
||||
|
||||
It requires that the global variable NSArgv be defined and set to the
|
||||
value of argv in main() in order to find the executable location.
|
||||
(Actually objc-load requires this).
|
||||
|
||||
Linking with different linkers and on different systems is different
|
||||
and may require some changes to the load flags, like -nostdlib,
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
#include <dl.h>
|
||||
|
||||
/* link flags */
|
||||
#define LINK_FLAGS (BIND_IMMEDIATE | BIND_VERBOSE)
|
||||
|
||||
/* Types defined appropriately for the dynamic linker */
|
||||
typedef shl_t dl_handle_t;
|
||||
typedef void* dl_symbol_t;
|
||||
|
@ -30,7 +33,7 @@ __objc_dynamic_init(const char* exec_path)
|
|||
static dl_handle_t
|
||||
__objc_dynamic_link(const char* module, int mode, const char* debug_file)
|
||||
{
|
||||
return (dl_handle_t)shl_load(module, 0, 0);
|
||||
return (dl_handle_t)shl_load(module, LINK_FLAGS, 0L);
|
||||
}
|
||||
|
||||
/* Return the address of a symbol given by the name 'symbol' from the module
|
||||
|
@ -41,7 +44,9 @@ __objc_dynamic_find_symbol(dl_handle_t handle, const char* symbol)
|
|||
{
|
||||
int ok;
|
||||
void *value;
|
||||
ok = shl_findsym(&handle, symbol, 0, value);
|
||||
ok = shl_findsym(&handle, symbol, TYPE_UNDEFINED, value);
|
||||
if (ok != 0)
|
||||
value = 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -74,4 +79,4 @@ __objc_dynamic_list_undefined_symbols(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* __HPUX_LOAD_INCLUDE__ */
|
||||
#endif /* __hpux_load_h_INCLUDE */
|
||||
|
|
Loading…
Reference in a new issue