diff options
-rw-r--r-- | include/slibtool/slibtool.h | 1 | ||||
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 15 |
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 */ |