summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/mdso_create_implib_sources.c2
-rw-r--r--src/logic/mdso_generate_symfn.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c
index 93c83d5..fb12e97 100644
--- a/src/logic/mdso_create_implib_sources.c
+++ b/src/logic/mdso_create_implib_sources.c
@@ -69,7 +69,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
if (!(fout = mdso_create_output(dctx,asmname)))
return MDSO_NESTED_ERROR(dctx);
- ret = mdso_generate_symfn(*sym,fout);
+ ret = mdso_generate_symfn(dctx,*sym,fout);
if (fout != stdout)
fclose(fout);
diff --git a/src/logic/mdso_generate_symfn.c b/src/logic/mdso_generate_symfn.c
index 730281a..7b3b295 100644
--- a/src/logic/mdso_generate_symfn.c
+++ b/src/logic/mdso_generate_symfn.c
@@ -6,7 +6,9 @@
#include <stdint.h>
#include <stdio.h>
+
#include <mdso/mdso.h>
+#include "mdso_errinfo_impl.h"
static const char * const asm_lines[] = {
"\t.file \"__%s_sym_fn.s\"\n",
@@ -19,13 +21,16 @@ static const char * const asm_lines[] = {
0
};
-int mdso_generate_symfn(const char * sym, FILE * fout)
+int mdso_generate_symfn(
+ const struct mdso_driver_ctx * dctx,
+ const char * sym,
+ FILE * fout)
{
const char * const * line;
for (line=asm_lines; *line; line++)
if ((fprintf(fout,*line,sym)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
return 0;
}