From 02e881466ff1700d4abf6d5a42b2f29e981c4be9 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 13 Feb 2017 01:07:57 -0500 Subject: mdso_create_implib_objects(): do not generate foo_symfn.o for data symbols. --- src/util/mdso_create_implib_objects.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/util') diff --git a/src/util/mdso_create_implib_objects.c b/src/util/mdso_create_implib_objects.c index fb7cfea..5740109 100644 --- a/src/util/mdso_create_implib_objects.c +++ b/src/util/mdso_create_implib_objects.c @@ -50,16 +50,18 @@ mdso_api int mdso_create_implib_objects(const struct mdso_driver_ctx * dctx) if (ret < 0) return MDSO_NESTED_ERROR(dctx); - mdso_init_objname(objname,".%s_symfn.o",*sym); + if (uctx->stype[sym-uctx->syms] == MDSO_SYMBOL_TYPE_CODE) { + mdso_init_objname(objname,".%s_symfn.o",*sym); - if (!(fout = mdso_create_object(dctx,objname))) - return MDSO_NESTED_ERROR(dctx); + if (!(fout = mdso_create_object(dctx,objname))) + return MDSO_NESTED_ERROR(dctx); - ret = mdso_objgen_symfn(dctx,*sym,fout,0); - fclose(fout); + ret = mdso_objgen_symfn(dctx,*sym,fout,0); + fclose(fout); - if (ret < 0) - return MDSO_NESTED_ERROR(dctx); + if (ret < 0) + return MDSO_NESTED_ERROR(dctx); + } } mdso_free_unit_ctx(uctx); -- cgit v1.2.3