summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-17 16:16:03 -0400
committermidipix <writeonce@midipix.org>2016-04-17 17:33:36 -0400
commitb4491f80105c1b2344578c29d36bb173b57c3233 (patch)
treed445cdd40840a31c3cb5bec67b4d6a5d57a9233e
parente15ee1671b4b2904c264250d69b0781849981bab (diff)
downloadslibtool-b4491f80105c1b2344578c29d36bb173b57c3233.tar.bz2
slibtool-b4491f80105c1b2344578c29d36bb173b57c3233.tar.xz
execution context: PE support: added symdef file name.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/logic/slbt_exec_ctx.c15
2 files changed, 13 insertions, 3 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index c580c30..9d74769 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -115,6 +115,7 @@ struct slbt_exec_ctx {
char * arfilename;
char * lafilename;
char * dsofilename;
+ char * deffilename;
char * exefilename;
pid_t pid;
int exitcode;
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index 239c5e5..d7038fc 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -83,11 +83,11 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc(
else
size += sizeof('\0') + strlen(*parg);
- /* buffer size (ldirname, lbasename, lobjname, aobjname, ltobjname) */
+ /* buffer size (ldirname, lbasename, lobjname, aobjname, etc.) */
if (dctx->cctx->output)
- size += 4*strlen(dctx->cctx->output);
+ size += 8*strlen(dctx->cctx->output);
else if ((csrc = slbt_source_file(dctx->cctx->cargv)))
- size += 4*strlen(csrc);
+ size += 8*strlen(csrc);
/* pessimistic argc: .libs/libfoo.so --> -L.libs -lfoo */
argc *= 2;
@@ -300,6 +300,15 @@ int slbt_get_exec_ctx(
dctx->cctx->libname,
dctx->cctx->settings.dsosuffix)
+ sizeof('\0');
+
+ /* deffilename */
+ ictx->ctx.deffilename = ch;
+ ch += sprintf(ch,"%s%s%s%s.def",
+ ictx->ctx.ldirname,
+ dctx->cctx->settings.dsoprefix,
+ dctx->cctx->libname,
+ dctx->cctx->settings.dsosuffix)
+ + sizeof('\0');
}
/* linking: exefilename */