summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-02-12 13:44:50 -0500
committermidipix <writeonce@midipix.org>2017-02-12 13:44:50 -0500
commit4cffdcf9d7bbffffc82cd899bcbdb889f5d023b8 (patch)
tree1a9909f84369143b3138aff6db13b4dc22d82baa
parent12fb1dbb0ed6b8b9b7c726b426a8c117e37c15fe (diff)
downloadmdso-4cffdcf9d7bbffffc82cd899bcbdb889f5d023b8.tar.bz2
mdso-4cffdcf9d7bbffffc82cd899bcbdb889f5d023b8.tar.xz
mdso_create_implib_sources(): support stdin and stdout more elegantly.
-rw-r--r--src/util/mdso_create_implib_sources.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/util/mdso_create_implib_sources.c b/src/util/mdso_create_implib_sources.c
index 1031920..d92e983 100644
--- a/src/util/mdso_create_implib_sources.c
+++ b/src/util/mdso_create_implib_sources.c
@@ -33,19 +33,8 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
const char * const * sym;
int ret;
- mdso_init_asmname(asmname,".dsometa_%s.s",dctx->cctx->libname);
-
- if (!(fout = mdso_create_asm_source(dctx,asmname)))
- return MDSO_NESTED_ERROR(dctx);
-
- ret = mdso_asmgen_dsometa(dctx,fout);
-
- if (fout != stdout)
- fclose(fout);
-
- if (ret < 0)
- return MDSO_NESTED_ERROR(dctx);
+ /* symentry, symfn */
for (unit=dctx->units; *unit; unit++) {
if (mdso_get_unit_ctx(dctx,*unit,&uctx))
return MDSO_NESTED_ERROR(dctx);
@@ -81,5 +70,16 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
mdso_free_unit_ctx(uctx);
}
- return 0;
+ /* dsometa */
+ mdso_init_asmname(asmname,".dsometa_%s.s",dctx->cctx->libname);
+
+ if (!(fout = mdso_create_asm_source(dctx,asmname)))
+ return MDSO_NESTED_ERROR(dctx);
+
+ ret = mdso_asmgen_dsometa(dctx,fout);
+
+ if (fout != stdout)
+ fclose(fout);
+
+ return (ret < 0) ? MDSO_NESTED_ERROR(dctx) : 0;
}