mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
libports: libc: extract file name from path in dlopen
'dlopen' causes the ldso to open ROM connections, right now we only support single file names for these ROM not paths. Therefore, we extract the file name from path within libc's 'dlopen' fixes #3551
This commit is contained in:
parent
a54c04d247
commit
f7509a5b78
@ -76,8 +76,11 @@ void *dlopen(const char *name, int mode)
|
||||
|
||||
try {
|
||||
static Libc::Allocator global_alloc;
|
||||
|
||||
return new (global_alloc)
|
||||
Shared_object(*genode_env, global_alloc, name, bind, keep);
|
||||
Shared_object(*genode_env, global_alloc,
|
||||
name ? Genode::Path<128>(name).last_element() : nullptr, /* extract file name */
|
||||
bind, keep);
|
||||
} catch (...) {
|
||||
snprintf(err_str, MAX_ERR, "Unable to open file %s\n", name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user