From 6ab3f1cde643d5e9408bac0b1ad10fb901cf2294 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 13 Feb 2024 03:53:17 +0000 Subject: slbt_get_lconf_flags(): keep the located libtool script mapped for later use. --- src/internal/slibtool_driver_impl.h | 2 ++ src/internal/slibtool_lconf_impl.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/internal') diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index f633adf..f563638 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -14,6 +14,7 @@ #include #include "slibtool_dprintf_impl.h" +#include "slibtool_mapfile_impl.h" #include "argv/argv.h" #define SLBT_OPTV_ELEMENTS 128 @@ -124,6 +125,7 @@ struct slbt_driver_ctx_impl { struct slbt_host_strs host; struct slbt_host_strs ahost; struct slbt_fd_ctx fdctx; + struct slbt_map_info lconf; struct slbt_obj_list * objlistv; const struct slbt_archive_ctx * arctx; diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index b1bde60..da0ffdd 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -807,7 +807,8 @@ int slbt_get_lconf_flags( /* all done */ - munmap(addr,st.st_size); + ctx->lconf.addr = addr; + ctx->lconf.size = st.st_size; return 0; } -- cgit v1.2.3