summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mdso/mdso.h2
-rw-r--r--src/logic/mdso_create_implib_sources.c2
-rw-r--r--src/logic/mdso_generate_symfn.c9
3 files changed, 9 insertions, 4 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h
index 08821ed..4d770de 100644
--- a/include/mdso/mdso.h
+++ b/include/mdso/mdso.h
@@ -121,7 +121,7 @@ mdso_api uint64_t mdso_crc64_mbstr (const unsigned char * str, size_t * symlen);
mdso_api FILE * mdso_create_output (const struct mdso_driver_ctx *, const char * asmname);
mdso_api int mdso_generate_dsometa (const struct mdso_driver_ctx *, FILE * fout);
mdso_api int mdso_generate_symentry(const struct mdso_driver_ctx *, const char * sym, FILE * fout);
-mdso_api int mdso_generate_symfn (const char * sym, FILE * fout);
+mdso_api int mdso_generate_symfn (const struct mdso_driver_ctx *, const char * sym, FILE * fout);
#ifdef __cplusplus
}
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;
}