diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/mdso_amain.c | 10 | ||||
-rw-r--r-- | src/driver/mdso_driver_ctx.c | 4 | ||||
-rw-r--r-- | src/internal/mdso_driver_impl.h | 1 | ||||
-rw-r--r-- | src/skin/mdso_skin_default.c | 3 |
4 files changed, 12 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; diff --git a/src/internal/mdso_driver_impl.h b/src/internal/mdso_driver_impl.h index 22fb893..5e260f8 100644 --- a/src/internal/mdso_driver_impl.h +++ b/src/internal/mdso_driver_impl.h @@ -15,6 +15,7 @@ extern const struct argv_option mdso_default_options[]; enum app_tags { TAG_HELP, TAG_VERSION, + TAG_ASM, TAG_QUAD_PTR, TAG_LIBPATH, TAG_LIBNAME, diff --git a/src/skin/mdso_skin_default.c b/src/skin/mdso_skin_default.c index c52649d..e7ad452 100644 --- a/src/skin/mdso_skin_default.c +++ b/src/skin/mdso_skin_default.c @@ -8,6 +8,9 @@ const struct argv_option mdso_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, "show usage information [listing %s options only]"}, + {"asm", 'a',TAG_ASM,ARGV_OPTARG_NONE,0,0,0, + "generate assembly sources"}, + {"machine", 'm',TAG_QUAD_PTR,ARGV_OPTARG_REQUIRED,0,"32|64",0, "set machine bits to %s"}, |