mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
39cbb1bdaa
commit
2a3bcfa4b4
2 changed files with 9 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
NSBundle problems:
|
NSBundle problems:
|
||||||
|
|
||||||
It requires that the global variable NSArgv be defined and set to the
|
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.
|
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
|
Linking with different linkers and on different systems is different
|
||||||
and may require some changes to the load flags, like -nostdlib,
|
and may require some changes to the load flags, like -nostdlib,
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
#include <dl.h>
|
#include <dl.h>
|
||||||
|
|
||||||
|
/* link flags */
|
||||||
|
#define LINK_FLAGS (BIND_IMMEDIATE | BIND_VERBOSE)
|
||||||
|
|
||||||
/* Types defined appropriately for the dynamic linker */
|
/* Types defined appropriately for the dynamic linker */
|
||||||
typedef shl_t dl_handle_t;
|
typedef shl_t dl_handle_t;
|
||||||
typedef void* dl_symbol_t;
|
typedef void* dl_symbol_t;
|
||||||
|
@ -30,7 +33,7 @@ __objc_dynamic_init(const char* exec_path)
|
||||||
static dl_handle_t
|
static dl_handle_t
|
||||||
__objc_dynamic_link(const char* module, int mode, const char* debug_file)
|
__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
|
/* 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;
|
int ok;
|
||||||
void *value;
|
void *value;
|
||||||
ok = shl_findsym(&handle, symbol, 0, value);
|
ok = shl_findsym(&handle, symbol, TYPE_UNDEFINED, value);
|
||||||
|
if (ok != 0)
|
||||||
|
value = 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,4 +79,4 @@ __objc_dynamic_list_undefined_symbols(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __HPUX_LOAD_INCLUDE__ */
|
#endif /* __hpux_load_h_INCLUDE */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue