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_dsometa.c20
2 files changed, 12 insertions, 10 deletions
diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c
index 6252387..8a3a4d0 100644
--- a/src/logic/mdso_create_implib_sources.c
+++ b/src/logic/mdso_create_implib_sources.c
@@ -38,7 +38,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_dsometa(dctx->cctx,fout);
+ ret = mdso_generate_dsometa(dctx,fout);
if (fout != stdout)
fclose(fout);
diff --git a/src/logic/mdso_generate_dsometa.c b/src/logic/mdso_generate_dsometa.c
index 86ec0f9..a02d1d1 100644
--- a/src/logic/mdso_generate_dsometa.c
+++ b/src/logic/mdso_generate_dsometa.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_hdr_lines[] = {
"\t.file \"__%s_dso_meta.s\"\n",
@@ -31,14 +33,14 @@ static const char * const asm_meta_lines[] = {
};
int mdso_generate_dsometa(
- const struct mdso_common_ctx * cctx,
+ const struct mdso_driver_ctx * dctx,
FILE * fout)
{
const char * const * line;
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 {
@@ -47,21 +49,21 @@ int mdso_generate_dsometa(
}
for (line=asm_hdr_lines; *line; line++)
- if ((fprintf(fout,*line,cctx->libname)) < 0)
- return -1;
+ if ((fprintf(fout,*line,dctx->cctx->libname)) < 0)
+ return MDSO_FILE_ERROR(dctx);
if ((fputs(alignstr,fout)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
if ((fprintf(fout,"\t%s\t%d\t# base\n",ptrsize,0)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
- if ((fprintf(fout,"\t%s\t%u\t# flags\n",".long",cctx->dsoflags)) < 0)
- return -1;
+ if ((fprintf(fout,"\t%s\t%u\t# flags\n",".long",dctx->cctx->dsoflags)) < 0)
+ return MDSO_FILE_ERROR(dctx);
for (line=asm_meta_lines; *line; line++)
if ((fprintf(fout,*line,ptrsize)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
return 0;
}