diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2019-08-08 03:33:44 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2019-08-08 03:33:44 +0000 |
commit | addc96410e6eae47a28314aeaace3228bd70b9cd (patch) | |
tree | 3998870b58279b308d8ea678debce30da103dd5e /experimental/elfutils/musl-qsort_r.patch | |
parent | 6e8939f34d9bcc8294a64b64e5fce9ce16668070 (diff) | |
parent | 6722ef49445b3fbe7665fc487733a8710a98fb5f (diff) | |
download | packages-addc96410e6eae47a28314aeaace3228bd70b9cd.tar.gz packages-addc96410e6eae47a28314aeaace3228bd70b9cd.tar.bz2 packages-addc96410e6eae47a28314aeaace3228bd70b9cd.tar.xz packages-addc96410e6eae47a28314aeaace3228bd70b9cd.zip |
Merge branch 'sr.2019.08.07' into 'master'
Misc changes, 2019.08.07
See merge request adelie/packages!315
Diffstat (limited to 'experimental/elfutils/musl-qsort_r.patch')
-rw-r--r-- | experimental/elfutils/musl-qsort_r.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/experimental/elfutils/musl-qsort_r.patch b/experimental/elfutils/musl-qsort_r.patch new file mode 100644 index 000000000..9be21bd25 --- /dev/null +++ b/experimental/elfutils/musl-qsort_r.patch @@ -0,0 +1,65 @@ +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -4773,10 +4773,11 @@ listptr_base (struct listptr *p) + return cudie_base (&cu); + } + ++static const char *listptr_name; ++ + static int +-compare_listptr (const void *a, const void *b, void *arg) ++compare_listptr (const void *a, const void *b) + { +- const char *name = arg; + struct listptr *p1 = (void *) a; + struct listptr *p2 = (void *) b; + +@@ -4792,21 +4793,21 @@ compare_listptr (const void *a, const void *b, void *arg) + p1->warned = p2->warned = true; + error (0, 0, + gettext ("%s %#" PRIx64 " used with different address sizes"), +- name, (uint64_t) p1->offset); ++ listptr_name, (uint64_t) p1->offset); + } + if (p1->dwarf64 != p2->dwarf64) + { + p1->warned = p2->warned = true; + error (0, 0, + gettext ("%s %#" PRIx64 " used with different offset sizes"), +- name, (uint64_t) p1->offset); ++ listptr_name, (uint64_t) p1->offset); + } + if (listptr_base (p1) != listptr_base (p2)) + { + p1->warned = p2->warned = true; + error (0, 0, + gettext ("%s %#" PRIx64 " used with different base addresses"), +- name, (uint64_t) p1->offset); ++ listptr_name, (uint64_t) p1->offset); + } + if (p1->attr != p2 ->attr) + { +@@ -4814,7 +4815,7 @@ compare_listptr (const void *a, const void *b, void *arg) + error (0, 0, + gettext ("%s %#" PRIx64 + " used with different attribute %s and %s"), +- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), ++ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), + dwarf_attr_name (p2->attr)); + } + } +@@ -4885,9 +4886,11 @@ notice_listptr (enum section_e section, struct listptr_table *table, + static void + sort_listptr (struct listptr_table *table, const char *name) + { +- if (table->n > 0) +- qsort_r (table->table, table->n, sizeof table->table[0], +- &compare_listptr, (void *) name); ++ if (table->n > 0) { ++ listptr_name = name; ++ qsort (table->table, table->n, sizeof table->table[0], ++ &compare_listptr); ++ } + } + + static bool |