mirror of
https://github.com/fluencelabs/musl
synced 2025-04-24 23:02:14 +00:00
remove unused refcnt field for shared libraries
This commit is contained in:
parent
c49d3c8ada
commit
cb525397bb
@ -52,7 +52,6 @@ struct dso {
|
|||||||
Phdr *phdr;
|
Phdr *phdr;
|
||||||
int phnum;
|
int phnum;
|
||||||
size_t phentsize;
|
size_t phentsize;
|
||||||
int refcnt;
|
|
||||||
Sym *syms;
|
Sym *syms;
|
||||||
Elf_Symndx *hashtab;
|
Elf_Symndx *hashtab;
|
||||||
uint32_t *ghashtab;
|
uint32_t *ghashtab;
|
||||||
@ -971,7 +970,6 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
|
|||||||
/* Search for the name to see if it's already loaded */
|
/* Search for the name to see if it's already loaded */
|
||||||
for (p=head->next; p; p=p->next) {
|
for (p=head->next; p; p=p->next) {
|
||||||
if (p->shortname && !strcmp(p->shortname, name)) {
|
if (p->shortname && !strcmp(p->shortname, name)) {
|
||||||
p->refcnt++;
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1034,7 +1032,6 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
|
|||||||
if (!p->shortname && pathname != name)
|
if (!p->shortname && pathname != name)
|
||||||
p->shortname = strrchr(p->name, '/')+1;
|
p->shortname = strrchr(p->name, '/')+1;
|
||||||
close(fd);
|
close(fd);
|
||||||
p->refcnt++;
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1074,7 +1071,6 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
|
|||||||
memcpy(p, &temp_dso, sizeof temp_dso);
|
memcpy(p, &temp_dso, sizeof temp_dso);
|
||||||
p->dev = st.st_dev;
|
p->dev = st.st_dev;
|
||||||
p->ino = st.st_ino;
|
p->ino = st.st_ino;
|
||||||
p->refcnt = 1;
|
|
||||||
p->needed_by = needed_by;
|
p->needed_by = needed_by;
|
||||||
p->name = p->buf;
|
p->name = p->buf;
|
||||||
strcpy(p->name, pathname);
|
strcpy(p->name, pathname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user