summaryrefslogtreecommitdiff
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_symentry.c18
2 files changed, 11 insertions, 9 deletions
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;
}