diff options
author | midipix <writeonce@midipix.org> | 2016-03-19 18:13:59 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-19 18:13:59 -0400 |
commit | 2691fe73dbf4bd16f98211830460041ef37f16bc (patch) | |
tree | f1e835f976826c80e0602cd06b6b89eb71c916d8 | |
parent | f10958966c8895244f8ed92ab957d923aa972806 (diff) | |
download | slibtool-2691fe73dbf4bd16f98211830460041ef37f16bc.tar.bz2 slibtool-2691fe73dbf4bd16f98211830460041ef37f16bc.tar.xz |
slbt_get_exec_ctx(): only initialize aobjname and ltobjname in compile mode.
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 7 |
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'); } |