summaryrefslogtreecommitdiffhomepage
path: root/src/util
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-02-11 21:46:22 -0500
committermidipix <writeonce@midipix.org>2017-02-11 21:53:44 -0500
commite3b1f2f9aa1116811817e8a664440b51e28a67d7 (patch)
treeb833b715788424f887ac5cd680eb2a0329ad28f2 /src/util
parent68360c8b966ffd92989c3a26a2be8919e6b8a091 (diff)
downloadmdso-e3b1f2f9aa1116811817e8a664440b51e28a67d7.tar.bz2
mdso-e3b1f2f9aa1116811817e8a664440b51e28a67d7.tar.xz
mdso_create_implib_archive(): create a prettier archive index.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mdso_create_implib_archive.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/mdso_create_implib_archive.c b/src/util/mdso_create_implib_archive.c
index 323b318..63bd9aa 100644
--- a/src/util/mdso_create_implib_archive.c
+++ b/src/util/mdso_create_implib_archive.c
@@ -22,6 +22,11 @@ static void mdso_free_uctx_vector(struct mdso_unit_ctx ** uctxv)
free(uctxv);
}
+static int mdso_symcmp(const void * src, const void * dst)
+{
+ return strcmp(*(const char **)src,*(const char **)dst);
+}
+
int mdso_create_implib_archive(const struct mdso_driver_ctx * dctx)
{
int ret;
@@ -71,6 +76,7 @@ int mdso_create_implib_archive(const struct mdso_driver_ctx * dctx)
for (dsym=puctx[0]->syms; *dsym; dsym++)
*psym++ = *dsym;
+ qsort(symv,nsym,sizeof(*symv),mdso_symcmp);
ret = mdso_argen_common(dctx,symv,fout,0);
fclose(fout);