summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-19 18:13:59 -0400
committermidipix <writeonce@midipix.org>2016-03-19 18:13:59 -0400
commit2691fe73dbf4bd16f98211830460041ef37f16bc (patch)
treef1e835f976826c80e0602cd06b6b89eb71c916d8 /src/logic
parentf10958966c8895244f8ed92ab957d923aa972806 (diff)
downloadslibtool-2691fe73dbf4bd16f98211830460041ef37f16bc.tar.bz2
slibtool-2691fe73dbf4bd16f98211830460041ef37f16bc.tar.xz
slbt_get_exec_ctx(): only initialize aobjname and ltobjname in compile mode.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_ctx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index a8afe76..5a61e24 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -193,7 +193,7 @@ int slbt_get_exec_ctx(
ictx->ctx.lout[1] = &ictx->ctx.argv[i++];
/* output file name */
- if (ref) {
+ if (ref && ((dctx->cctx->mode == SLBT_MODE_COMPILE))) {
*ictx->ctx.lout[0] = "-o";
*ictx->ctx.lout[1] = ch;
ictx->ctx.lobjname = ch;
@@ -215,10 +215,7 @@ int slbt_get_exec_ctx(
strcpy(ch,ictx->ctx.aobjname);
if ((ch = strrchr(ch,'.')))
- ch += sprintf(ch,"%s",
- (dctx->cctx->mode == SLBT_MODE_COMPILE)
- ? ".lo"
- : ".la")
+ ch += sprintf(ch,"%s",".lo")
+ sizeof('\0');
}