diff options
author | midipix <writeonce@midipix.org> | 2015-12-20 03:13:29 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:29 -0500 |
commit | 8cfad6a6b15e97d7a753558ebd34f8a9798196f6 (patch) | |
tree | faf7cbfb1bc9024db578fad55c8929991677c42a /src/driver | |
parent | 7770733c95046ac92b98c632374eaf7642eb1e5d (diff) | |
download | mdso-8cfad6a6b15e97d7a753558ebd34f8a9798196f6.tar.bz2 mdso-8cfad6a6b15e97d7a753558ebd34f8a9798196f6.tar.xz |
output, mdso_output_export_symbols(): initial implementation.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/mdso_driver_ctx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c index 9c891de..c1e34ba 100644 --- a/src/driver/mdso_driver_ctx.c +++ b/src/driver/mdso_driver_ctx.c @@ -11,6 +11,7 @@ #define ARGV_DRIVER #include <mdso/mdso.h> +#include <mdso/mdso_output.h> #include "mdso_driver_impl.h" #include "argv/argv.h" @@ -98,6 +99,7 @@ int mdso_get_driver_ctx( struct argv_entry * entry; size_t nunits; const char * program; + const char * pretty; options = mdso_default_options; @@ -105,6 +107,7 @@ int mdso_get_driver_ctx( return -1; nunits = 0; + pretty = 0; program = argv_program_name(argv[0]); memset(&cctx,0,sizeof(cctx)); @@ -122,11 +125,22 @@ int mdso_get_driver_ctx( case TAG_VERSION: cctx.drvflags |= MDSO_DRIVER_VERSION; break; + + case TAG_PRETTY: + pretty = entry->arg; + break; + + case TAG_EXPSYMS: + cctx.fmtflags |= MDSO_OUTPUT_EXPORT_SYMS; + break; } } else nunits++; } + if (pretty && !strcmp(pretty,"yaml")) + cctx.fmtflags |= MDSO_PRETTY_YAML; + if (!(ctx = mdso_driver_ctx_alloc(meta,nunits))) return mdso_get_driver_ctx_fail(meta); |