We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 367ad92 commit 1b92c75Copy full SHA for 1b92c75
libexec/rtld-elf/rtld.c
@@ -6417,9 +6417,11 @@ c18n_add_obj(Obj_Entry *obj, int flags)
6417
name = obj->soname;
6418
else if (!STAILQ_EMPTY(&obj->names))
6419
name = STAILQ_FIRST(&obj->names)->name;
6420
- else if (obj->path != NULL)
6421
- name = obj->path;
6422
- else {
+ else if (obj->path != NULL) {
+ name = strrchr(obj->path, '/');
+ if (name == NULL || name[1] == '\0')
6423
+ name = obj->path;
6424
+ } else {
6425
_rtld_error("Shared object at %#p cannot be named",
6426
obj->mapbase);
6427
return (false);
0 commit comments