summaryrefslogtreecommitdiffhomepage
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_symentry.c18
3 files changed, 12 insertions, 10 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h
index 6f37d89..08821ed 100644
--- a/include/mdso/mdso.h
+++ b/include/mdso/mdso.h
@@ -120,7 +120,7 @@ mdso_api uint32_t mdso_crc32_mbstr (const unsigned char * str, size_t * symlen);
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_common_ctx *, const char * sym, 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);
#ifdef __cplusplus
diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c
index 8a3a4d0..93c83d5 100644
--- a/src/logic/mdso_create_implib_sources.c
+++ b/src/logic/mdso_create_implib_sources.c
@@ -56,7 +56,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_symentry(dctx->cctx,*sym,fout);
+ ret = mdso_generate_symentry(dctx,*sym,fout);
if (fout != stdout)
fclose(fout);
diff --git a/src/logic/mdso_generate_symentry.c b/src/logic/mdso_generate_symentry.c
index ae9d1a5..80c297e 100644
--- a/src/logic/mdso_generate_symentry.c
+++ b/src/logic/mdso_generate_symentry.c
@@ -6,8 +6,10 @@
#include <stdint.h>
#include <stdio.h>
+
#include <mdso/mdso.h>
#include <mdso/mdso_specs.h>
+#include "mdso_errinfo_impl.h"
static const char * const asm_lines[] = {
"\t.file \"__%s_sym_entry.s\"\n",
@@ -24,7 +26,7 @@ static const char * const asm_lines[] = {
};
int mdso_generate_symentry(
- const struct mdso_common_ctx * cctx,
+ const struct mdso_driver_ctx * dctx,
const char * sym,
FILE * fout)
{
@@ -32,7 +34,7 @@ int mdso_generate_symentry(
const char * alignstr;
const char * ptrsize;
- if (cctx->drvflags & MDSO_DRIVER_QUAD_PTR) {
+ if (dctx->cctx->drvflags & MDSO_DRIVER_QUAD_PTR) {
alignstr = "\t.balign 16\n\n";
ptrsize = ".quad";
} else {
@@ -42,19 +44,19 @@ int mdso_generate_symentry(
for (line=asm_lines; *line; line++)
if ((fprintf(fout,*line,sym)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
if ((fputs(alignstr,fout)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
if ((fprintf(fout,"__imp_%s:\n",sym)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
if ((fprintf(fout,"\t%s\t.__dsostr_%s\n",ptrsize,sym)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
- if ((fprintf(fout,"\t%s\t.__dsometa_%s\n",ptrsize,cctx->libname)) < 0)
- return -1;
+ if ((fprintf(fout,"\t%s\t.__dsometa_%s\n",ptrsize,dctx->cctx->libname)) < 0)
+ return MDSO_FILE_ERROR(dctx);
return 0;
}