From 8535b67a7dbd5bb2e8c4e529c20ec8076b5cc27c Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 3 Feb 2019 23:21:54 -0500 Subject: Remove all bits pertaining to the obsolete distinction between code and data. --- src/util/mdso_create_implib_archive.c | 24 ++++++------------------ src/util/mdso_create_implib_objects.c | 10 +--------- src/util/mdso_create_implib_sources.c | 17 +---------------- 3 files changed, 8 insertions(+), 43 deletions(-) (limited to 'src/util') diff --git a/src/util/mdso_create_implib_archive.c b/src/util/mdso_create_implib_archive.c index 11373b4..a7e5cfe 100644 --- a/src/util/mdso_create_implib_archive.c +++ b/src/util/mdso_create_implib_archive.c @@ -14,17 +14,13 @@ static void mdso_free_uctx_vector( struct mdso_unit_ctx ** uctxv, - const char ** symv, - int * stype) + const char ** symv) { struct mdso_unit_ctx ** puctx; if (symv) free(symv); - if (stype) - free(stype); - for (puctx=uctxv; *puctx; puctx++) mdso_free_unit_ctx(*puctx); @@ -41,7 +37,6 @@ int mdso_create_implib_archive(const struct mdso_driver_ctx * dctx) const char ** unit; const char ** psym; const char ** symv; - int * stype; if (!dctx->cctx->implib) return MDSO_CUSTOM_ERROR(dctx,MDSO_ERR_INVALID_NAME); @@ -54,7 +49,7 @@ int mdso_create_implib_archive(const struct mdso_driver_ctx * dctx) for (puctx=uctxv,unit=dctx->units; *unit; unit++) { if (mdso_get_unit_ctx(dctx,*unit,puctx++)) { - mdso_free_uctx_vector(uctxv,0,0); + mdso_free_uctx_vector(uctxv,0); return MDSO_NESTED_ERROR(dctx); } } @@ -64,27 +59,20 @@ int mdso_create_implib_archive(const struct mdso_driver_ctx * dctx) nsym++; if (!(symv = calloc(nsym+1,sizeof(const char *)))) { - mdso_free_uctx_vector(uctxv,0,0); - return MDSO_SYSTEM_ERROR(dctx); - } - - if (!(stype = calloc(nsym+1,sizeof(int)))) { - mdso_free_uctx_vector(uctxv,symv,0); + mdso_free_uctx_vector(uctxv,0); return MDSO_SYSTEM_ERROR(dctx); } for (psym=symv,puctx=uctxv; *puctx; puctx++) { - for (dsym=puctx[0]->syms; *dsym; dsym++) { - stype[psym-symv] = puctx[0]->stype[dsym-puctx[0]->syms]; + for (dsym=puctx[0]->syms; *dsym; dsym++) *psym++ = *dsym; - } } memset(&obj,0,sizeof(obj)); obj.name = dctx->cctx->implib; - if (mdso_argen_common(dctx,symv,stype,&obj) < 0) { - mdso_free_uctx_vector(uctxv,symv,stype); + if (mdso_argen_common(dctx,symv,&obj) < 0) { + mdso_free_uctx_vector(uctxv,symv); return MDSO_NESTED_ERROR(dctx); } diff --git a/src/util/mdso_create_implib_objects.c b/src/util/mdso_create_implib_objects.c index 43f79ee..d310ff8 100644 --- a/src/util/mdso_create_implib_objects.c +++ b/src/util/mdso_create_implib_objects.c @@ -38,7 +38,7 @@ int mdso_create_implib_objects(const struct mdso_driver_ctx * dctx) const char * const * sym; char objname[PATH_MAX]; - /* symentry, symfn */ + /* symentry */ for (unit=dctx->units; *unit; unit++) { if (mdso_get_unit_ctx(dctx,*unit,&uctx)) return MDSO_NESTED_ERROR(dctx); @@ -49,14 +49,6 @@ int mdso_create_implib_objects(const struct mdso_driver_ctx * dctx) if (mdso_objgen_symentry(dctx,*sym,&obj) < 0) return MDSO_NESTED_ERROR(dctx); - - if (uctx->stype[sym-uctx->syms] == MDSO_SYMBOL_TYPE_CODE) { - mdso_init_objname(objname,".%s_symfn.o",*sym); - mdso_init_object(&obj,objname); - - if (mdso_objgen_symfn(dctx,*sym,&obj) < 0) - return MDSO_NESTED_ERROR(dctx); - } } mdso_free_unit_ctx(uctx); diff --git a/src/util/mdso_create_implib_sources.c b/src/util/mdso_create_implib_sources.c index 1ee647d..317f2c8 100644 --- a/src/util/mdso_create_implib_sources.c +++ b/src/util/mdso_create_implib_sources.c @@ -35,7 +35,7 @@ int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) int ret; - /* symentry, symfn */ + /* symentry */ for (unit=dctx->units; *unit; unit++) { if (mdso_get_unit_ctx(dctx,*unit,&uctx)) return MDSO_NESTED_ERROR(dctx); @@ -53,21 +53,6 @@ int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) if (ret < 0) return MDSO_NESTED_ERROR(dctx); - - if (uctx->stype[sym-uctx->syms] == MDSO_SYMBOL_TYPE_CODE) { - mdso_init_asmname(asmname,".%s_symfn.s",*sym); - - if ((fdout = mdso_create_asmsrc(dctx,asmname)) < 0) - return MDSO_NESTED_ERROR(dctx); - - ret = mdso_asmgen_symfn(dctx,*sym,fdout); - - if (fdout != mdso_driver_fdout(dctx)) - close(fdout); - - if (ret < 0) - return MDSO_NESTED_ERROR(dctx); - } } mdso_free_unit_ctx(uctx); -- cgit v1.2.3