summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logic/mdso_create_implib_sources.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c
index cecb680..6252387 100644
--- a/src/logic/mdso_create_implib_sources.c
+++ b/src/logic/mdso_create_implib_sources.c
@@ -7,7 +7,9 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <mdso/mdso.h>
+#include "mdso_errinfo_impl.h"
static void mdso_init_asmname(char * buf, const char * fmt, const char * str)
{
@@ -34,7 +36,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
mdso_init_asmname(asmname,"__%s_dso_meta.s",dctx->cctx->libname);
if (!(fout = mdso_create_output(dctx,asmname)))
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
ret = mdso_generate_dsometa(dctx->cctx,fout);
@@ -42,17 +44,17 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
fclose(fout);
if (ret < 0)
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
for (unit=dctx->units; *unit; unit++) {
if (mdso_get_unit_ctx(dctx,*unit,&uctx))
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
for (sym=uctx->syms; *sym; sym++) {
mdso_init_asmname(asmname,"__%s_sym_entry.s",*sym);
if (!(fout = mdso_create_output(dctx,asmname)))
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
ret = mdso_generate_symentry(dctx->cctx,*sym,fout);
@@ -60,12 +62,12 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
fclose(fout);
if (ret < 0)
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
mdso_init_asmname(asmname,"__%s_sym_fn.s",*sym);
if (!(fout = mdso_create_output(dctx,asmname)))
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
ret = mdso_generate_symfn(*sym,fout);
@@ -73,7 +75,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
fclose(fout);
if (ret < 0)
- return -1;
+ return MDSO_NESTED_ERROR(dctx);
}
mdso_free_unit_ctx(uctx);