diff options
-rw-r--r-- | include/mdso/mdso.h | 2 | ||||
-rw-r--r-- | src/driver/mdso_amain.c | 9 | ||||
-rw-r--r-- | src/output/mdso_output_export_symbols.c | 11 |
3 files changed, 13 insertions, 9 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h index bd5c29f..ed74243 100644 --- a/include/mdso/mdso.h +++ b/include/mdso/mdso.h @@ -112,7 +112,7 @@ mdso_api int mdso_unmap_input (struct mdso_input *); /* utility api */ mdso_api int mdso_main (int, char **, char **); -mdso_api int mdso_output_export_symbols(const struct mdso_unit_ctx *, const struct mdso_common_ctx *, FILE *); +mdso_api int mdso_output_export_symbols(const struct mdso_driver_ctx *, const struct mdso_unit_ctx *, FILE *); mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx *); /* low-level api */ diff --git a/src/driver/mdso_amain.c b/src/driver/mdso_amain.c index a00e2d1..a952b02 100644 --- a/src/driver/mdso_amain.c +++ b/src/driver/mdso_amain.c @@ -46,12 +46,15 @@ static ssize_t mdso_version(struct mdso_driver_ctx * dctx) verclr[4],verinfo->commit,verclr[5]); } -static void mdso_perform_unit_actions(struct mdso_unit_ctx * uctx) +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) { - uctx->status = mdso_output_export_symbols(uctx,uctx->cctx,stdout); + uctx->status = mdso_output_export_symbols( + dctx,uctx,stdout); uctx->nerrors += !!uctx->status; } } @@ -78,7 +81,7 @@ int mdso_main(int argc, char ** argv, char ** envp) for (unit=dctx->units; *unit; unit++) { if (!(mdso_get_unit_ctx(dctx,*unit,&uctx))) { - mdso_perform_unit_actions(uctx); + mdso_perform_unit_actions(dctx,uctx); ret += uctx->nerrors; mdso_free_unit_ctx(uctx); } diff --git a/src/output/mdso_output_export_symbols.c b/src/output/mdso_output_export_symbols.c index 234fce9..097b8a2 100644 --- a/src/output/mdso_output_export_symbols.c +++ b/src/output/mdso_output_export_symbols.c @@ -12,6 +12,7 @@ #include <mdso/mdso.h> #include <mdso/mdso_output.h> +#include "mdso_errinfo_impl.h" static int pretty_header(const struct mdso_common_ctx * cctx, FILE * fout) { @@ -29,8 +30,8 @@ static int pretty_export_item(const struct mdso_common_ctx * cctx, const char * } int mdso_output_export_symbols( + const struct mdso_driver_ctx * dctx, const struct mdso_unit_ctx * uctx, - const struct mdso_common_ctx * cctx, FILE * fout) { const char * const * sym; @@ -38,12 +39,12 @@ int mdso_output_export_symbols( if (!uctx->syms[0]) return 0; - if ((pretty_header(cctx,fout)) < 0) - return -1; + if ((pretty_header(dctx->cctx,fout)) < 0) + return MDSO_FILE_ERROR(dctx); for (sym=uctx->syms; *sym; sym++) - if ((pretty_export_item(cctx,*sym,fout)) < 0) - return -1; + if ((pretty_export_item(dctx->cctx,*sym,fout)) < 0) + return MDSO_FILE_ERROR(dctx); return 0; } |