summaryrefslogtreecommitdiff
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-16 17:34:12 +0000
committermidipix <writeonce@midipix.org>2024-03-16 17:34:12 +0000
commit886c09eb7caa4f82d98ca87dab24418a344f5ae7 (patch)
treef29d8a3637b003a4a38dcf935a40fbf61fe83884 /src/arbits
parent9f06b2ba383a2b998c010c4151b1dcbcbf3e2754 (diff)
downloadslibtool-886c09eb7caa4f82d98ca87dab24418a344f5ae7.tar.bz2
slibtool-886c09eb7caa4f82d98ca87dab24418a344f5ae7.tar.xz
code base: internals: move slbt_coff_strcmp() to own translation unit.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_mapstrv.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/arbits/slbt_archive_mapstrv.c b/src/arbits/slbt_archive_mapstrv.c
index 10d59f1..c8c27e9 100644
--- a/src/arbits/slbt_archive_mapstrv.c
+++ b/src/arbits/slbt_archive_mapstrv.c
@@ -11,50 +11,13 @@
#include "slibtool_errinfo_impl.h"
#include "slibtool_visibility_impl.h"
#include "slibtool_ar_impl.h"
+#include "slibtool_coff_impl.h"
static int slbt_strcmp(const void * a, const void * b)
{
return strcmp(*(const char **)a,*(const char **)b);
}
-static int slbt_coff_strcmp(const void * a, const void * b)
-{
- const char * dot;
- const char * mark;
- const char * stra;
- const char * strb;
- const char ** pstra;
- const char ** pstrb;
- char strbufa[4096];
- char strbufb[4096];
-
- pstra = (const char **)a;
- pstrb = (const char **)b;
-
- stra = *pstra;
- strb = *pstrb;
-
- if (!strncmp(*pstra,".weak.",6)) {
- stra = strbufa;
- mark = &(*pstra)[6];
- dot = strchr(mark,'.');
-
- strncpy(strbufa,mark,dot-mark);
- strbufa[dot-mark] = '\0';
- }
-
- if (!strncmp(*pstrb,".weak.",6)) {
- strb = strbufb;
- mark = &(*pstrb)[6];
- dot = strchr(mark,'.');
-
- strncpy(strbufb,mark,dot-mark);
- strbufb[dot-mark] = '\0';
- }
-
- return strcmp(stra,strb);
-}
-
slbt_hidden int slbt_update_mapstrv(
const struct slbt_driver_ctx * dctx,
struct slbt_archive_meta_impl * mctx)