summaryrefslogtreecommitdiffhomepage
path: root/src/util
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-03 23:21:54 -0500
committermidipix <writeonce@midipix.org>2019-02-04 00:43:59 -0500
commit8535b67a7dbd5bb2e8c4e529c20ec8076b5cc27c (patch)
tree013eeed4634f35720499814c14fbbc6f9e353a5b /src/util
parent6612c3842b872a13291962e4744a8bffd0695d1a (diff)
downloadmdso-8535b67a7dbd5bb2e8c4e529c20ec8076b5cc27c.tar.bz2
mdso-8535b67a7dbd5bb2e8c4e529c20ec8076b5cc27c.tar.xz
Remove all bits pertaining to the obsolete distinction between code and data.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mdso_create_implib_archive.c24
-rw-r--r--src/util/mdso_create_implib_objects.c10
-rw-r--r--src/util/mdso_create_implib_sources.c17
3 files changed, 8 insertions, 43 deletions
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);