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_dsometa.c20
3 files changed, 13 insertions, 11 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h
index 192dcb0..6f37d89 100644
--- a/include/mdso/mdso.h
+++ b/include/mdso/mdso.h
@@ -119,7 +119,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx *);
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_common_ctx *, FILE * fout);
+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_symfn (const char * sym, FILE * fout);
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;
}