summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-30 08:02:45 -0400
committermidipix <writeonce@midipix.org>2016-04-30 08:03:53 -0400
commitdf07fbfa9bfb2d04b459080ca1b2e8c69c5631dc (patch)
treedcb734ba5e7b43be04968e801fe9da584ea99e2c
parented278036574c892772b26ee110ba6e1258affbe6 (diff)
downloadslibtool-df07fbfa9bfb2d04b459080ca1b2e8c69c5631dc.tar.bz2
slibtool-df07fbfa9bfb2d04b459080ca1b2e8c69c5631dc.tar.xz
link mode: added output annotation support.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/logic/slbt_exec_ctx.c3
-rw-r--r--src/logic/slbt_exec_link.c7
-rw-r--r--src/output/slbt_output_exec.c2
4 files changed, 12 insertions, 1 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 785dae6..5f4955b 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -119,6 +119,7 @@ struct slbt_exec_ctx {
char ** symdefs;
char ** symfile;
char ** lout[2];
+ char ** mout[2];
char ** rpath[2];
char ** sentinel;
FILE * fwrapper;
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index e9e7340..320314b 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -464,6 +464,9 @@ void slbt_reset_placeholders(struct slbt_exec_ctx * ectx)
*ectx->rpath[0] = "-USLIBTOOL_PLACEHOLDER_RPATH_SWITCH";
*ectx->rpath[1] = "-USLIBTOOL_PLACEHOLDER_RPATH_DIR";
+ ectx->mout[0] = 0;
+ ectx->mout[1] = 0;
+
*ectx->sentinel= 0;
}
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 1c872be..452c9da 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -277,6 +277,13 @@ static int slbt_exec_link_adjust_argument_vector(
+ /* output annotation */
+ if (carg == ectx->lout[0]) {
+ ectx->mout[0] = &aarg[0];
+ ectx->mout[1] = &aarg[1];
+ }
+
+ /* argument translation */
if (**carg == '-') {
*aarg++ = *carg++;
diff --git a/src/output/slbt_output_exec.c b/src/output/slbt_output_exec.c
index 7886e0a..5adb4bb 100644
--- a/src/output/slbt_output_exec.c
+++ b/src/output/slbt_output_exec.c
@@ -33,7 +33,7 @@ static int slbt_output_exec_annotated(
return -1;
for (parg=ectx->argv; *parg; parg++) {
- if (parg == ectx->lout[0]) {
+ if ((parg == ectx->lout[0]) || (parg == ectx->mout[0])) {
aclr_set = aclr_bold;
aclr_color = aclr_blue;
aclr_unset = aclr_null;