summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-10 00:15:34 -0500
committermidipix <writeonce@midipix.org>2016-03-10 08:32:40 -0500
commite02305465d278aa96f5650b41a592fe97208d208 (patch)
tree72dd36fa967ea9f015bc988fe3b6a8499d90a4a9 /src
parent5aae4bb6c4d410c35c7ced08cae21ff3273d5155 (diff)
downloadslibtool-e02305465d278aa96f5650b41a592fe97208d208.tar.bz2
slibtool-e02305465d278aa96f5650b41a592fe97208d208.tar.xz
slbt_get_exec_ctx(): added support for .aobjname.
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_ctx.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index cfa7434..f6bea2e 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -77,11 +77,11 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc(
else
size += sizeof('\0') + strlen(*parg);
- /* buffer size (ldirname, lbasename, lobjname) */
+ /* buffer size (ldirname, lbasename, lobjname, aobjname) */
if (dctx->cctx->output)
- size += 3*strlen(dctx->cctx->output);
+ size += 4*strlen(dctx->cctx->output);
else if ((csrc = slbt_source_file(dctx->cctx->cargv)))
- size += 3*strlen(csrc);
+ size += 4*strlen(csrc);
/* alloc */
if (!(args = malloc(size)))
@@ -197,9 +197,16 @@ int slbt_get_exec_ctx(
*ictx->ctx.lout[1] = ch;
ictx->ctx.lobjname = ch;
- sprintf(ch,"%s%s",
+ ch += sprintf(ch,"%s%s",
ictx->ctx.ldirname,
- ictx->ctx.lbasename);
+ ictx->ctx.lbasename)
+ + sizeof('\0');
+
+ ictx->ctx.aobjname = ch;
+
+ ch += sprintf(ch,"%s",ictx->ctx.ldirname);
+ ch -= strlen(".libs/");
+ sprintf(ch,ictx->ctx.lbasename);
}
*ectx = &ictx->ctx;