summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-02-07 23:06:15 -0500
committermidipix <writeonce@midipix.org>2017-02-08 01:19:08 -0500
commitc12a925ddba06fc1d11298fc26c10f2d5ffb91db (patch)
tree8440a09f0972f71282c5fefe1b6d56fc2a9bc036 /src/driver
parent2f03312a60aefe175c0d6764975c632b41e676c8 (diff)
downloadmdso-c12a925ddba06fc1d11298fc26c10f2d5ffb91db.tar.bz2
mdso-c12a925ddba06fc1d11298fc26c10f2d5ffb91db.tar.xz
driver: added --asm support.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/mdso_amain.c10
-rw-r--r--src/driver/mdso_driver_ctx.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/driver/mdso_amain.c b/src/driver/mdso_amain.c
index 985278d..b85a568 100644
--- a/src/driver/mdso_amain.c
+++ b/src/driver/mdso_amain.c
@@ -50,9 +50,7 @@ static void mdso_perform_unit_actions(
struct mdso_driver_ctx * dctx,
struct mdso_unit_ctx * uctx)
{
- uint64_t flags = uctx->cctx->fmtflags;
-
- if (flags & MDSO_OUTPUT_EXPORT_SYMS)
+ if (uctx->cctx->fmtflags & MDSO_OUTPUT_EXPORT_SYMS)
mdso_output_export_symbols(
dctx,uctx,stdout);
}
@@ -80,6 +78,9 @@ int mdso_main(int argc, char ** argv, char ** envp)
if ((mdso_version(dctx)) < 0)
return mdso_exit(dctx,MDSO_ERROR);
+ if (dctx->cctx->drvflags & MDSO_DRIVER_GENERATE_ASM)
+ mdso_create_implib_sources(dctx);
+
for (unit=dctx->units; *unit && !dctx->errv[0]; unit++) {
if (!(mdso_get_unit_ctx(dctx,*unit,&uctx))) {
mdso_perform_unit_actions(dctx,uctx);
@@ -87,8 +88,5 @@ int mdso_main(int argc, char ** argv, char ** envp)
}
}
- if (*dctx->units && !dctx->errv[0])
- mdso_create_implib_sources(dctx);
-
return mdso_exit(dctx,dctx->errv[0] ? MDSO_ERROR : MDSO_OK);
}
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c
index 6c0c491..1c96911 100644
--- a/src/driver/mdso_driver_ctx.c
+++ b/src/driver/mdso_driver_ctx.c
@@ -192,6 +192,10 @@ int mdso_get_driver_ctx(
cctx.drvflags |= MDSO_DRIVER_VERSION;
break;
+ case TAG_ASM:
+ cctx.drvflags |= MDSO_DRIVER_GENERATE_ASM;
+ break;
+
case TAG_QUAD_PTR:
if (!(strcmp(entry->arg,"64")))
cctx.drvflags |= MDSO_DRIVER_QUAD_PTR;