Mercurial > hg > graal-jvmci-8
comparison src/os/bsd/vm/os_bsd.cpp @ 14286:c250880a6673
8031968: Mac OS X: VM starts the agent by calling both Agent_OnAttach and Agent_OnAttach_L functions if its agent library is dynamically linked.
Summary: Make sure we only look for statically linked agents in the main process image
Reviewed-by: dsamersoff, bpittore, dcubed
author | sla |
---|---|
date | Thu, 23 Jan 2014 09:06:21 +0100 |
parents | 3b32d287da89 |
children | 5944dba4badc bbfbe9b06038 |
comparison
equal
deleted
inserted
replaced
14285:20e2bd0e84bf | 14286:c250880a6673 |
---|---|
1554 } | 1554 } |
1555 | 1555 |
1556 return NULL; | 1556 return NULL; |
1557 } | 1557 } |
1558 #endif /* !__APPLE__ */ | 1558 #endif /* !__APPLE__ */ |
1559 | |
1560 void* os::get_default_process_handle() { | |
1561 #ifdef __APPLE__ | |
1562 // MacOS X needs to use RTLD_FIRST instead of RTLD_LAZY | |
1563 // to avoid finding unexpected symbols on second (or later) | |
1564 // loads of a library. | |
1565 return (void*)::dlopen(NULL, RTLD_FIRST); | |
1566 #else | |
1567 return (void*)::dlopen(NULL, RTLD_LAZY); | |
1568 #endif | |
1569 } | |
1559 | 1570 |
1560 // XXX: Do we need a lock around this as per Linux? | 1571 // XXX: Do we need a lock around this as per Linux? |
1561 void* os::dll_lookup(void* handle, const char* name) { | 1572 void* os::dll_lookup(void* handle, const char* name) { |
1562 return dlsym(handle, name); | 1573 return dlsym(handle, name); |
1563 } | 1574 } |