diff --git a/NSBundle.README b/NSBundle.README
index 2881bc44c..617be4778 100644
--- a/NSBundle.README
+++ b/NSBundle.README
@@ -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,
diff --git a/Source/hpux-load.h b/Source/hpux-load.h
index 99958ba6a..ed8f6ac24 100644
--- a/Source/hpux-load.h
+++ b/Source/hpux-load.h
@@ -11,6 +11,9 @@
#include
+/* 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 */