aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-03-20 15:25:48 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-03-21 08:15:29 +0200
commit1a4d299a0242a02aa0d4843dd9947d4187e70414 (patch)
tree524965445ca8c9eba7f425db6ffb2035d8025500 /main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch
parentc12931e8863fa9fddc90390db24a4a591f43043e (diff)
downloadaports-1a4d299a0242a02aa0d4843dd9947d4187e70414.tar.bz2
aports-1a4d299a0242a02aa0d4843dd9947d4187e70414.tar.xz
main/musl: cherry-pick upstream fixes
ldso changes (lazy emulation etc) are not stable yet, so it's are not included. the missing patch numbers are for those commits.
Diffstat (limited to 'main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch')
-rw-r--r--main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch b/main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch
new file mode 100644
index 0000000000..15b76119fe
--- /dev/null
+++ b/main/musl/0025-remove-unused-refcnt-field-for-shared-libraries.patch
@@ -0,0 +1,48 @@
+From cb525397bb053ea49cf160965477a17b17286eb3 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Tue, 14 Mar 2017 19:00:02 -0400
+Subject: [PATCH] remove unused refcnt field for shared libraries
+
+---
+ ldso/dynlink.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/ldso/dynlink.c b/ldso/dynlink.c
+index 80d85e94..178fe27e 100644
+--- a/ldso/dynlink.c
++++ b/ldso/dynlink.c
+@@ -52,7 +52,6 @@ struct dso {
+ Phdr *phdr;
+ int phnum;
+ size_t phentsize;
+- int refcnt;
+ Sym *syms;
+ Elf_Symndx *hashtab;
+ 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 */
+ for (p=head->next; p; p=p->next) {
+ if (p->shortname && !strcmp(p->shortname, name)) {
+- p->refcnt++;
+ return p;
+ }
+ }
+@@ -1034,7 +1032,6 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
+ if (!p->shortname && pathname != name)
+ p->shortname = strrchr(p->name, '/')+1;
+ close(fd);
+- p->refcnt++;
+ 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);
+ p->dev = st.st_dev;
+ p->ino = st.st_ino;
+- p->refcnt = 1;
+ p->needed_by = needed_by;
+ p->name = p->buf;
+ strcpy(p->name, pathname);
+--
+2.11.1
+