summaryrefslogtreecommitdiffhomepage
path: root/src/internal/slibtool_driver_impl.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-06 09:19:04 +0000
committermidipix <writeonce@midipix.org>2024-01-22 03:49:50 +0000
commit7bab5a71cefe37b583b08fec0177fc569f041980 (patch)
tree2b9df70fa95b7481deff97d66fbc3b00a46681ff /src/internal/slibtool_driver_impl.h
parentd4473b3be02d429a72347914a6fc7e5688ad98e5 (diff)
downloadslibtool-7bab5a71cefe37b583b08fec0177fc569f041980.tar.bz2
slibtool-7bab5a71cefe37b583b08fec0177fc569f041980.tar.xz
ar mode: slbt_get_archive_ctx(): initial implementation and integration.
Diffstat (limited to 'src/internal/slibtool_driver_impl.h')
-rw-r--r--src/internal/slibtool_driver_impl.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 0293308..388e1cf 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -116,6 +116,10 @@ struct slbt_driver_ctx_impl {
struct slbt_host_strs ahost;
struct slbt_fd_ctx fdctx;
struct slbt_obj_list * objlistv;
+
+ const struct slbt_archive_ctx * arctx;
+ const char * arpath;
+
char * libname;
char * dargs;
char ** dargv;
@@ -141,6 +145,13 @@ struct slbt_exec_ctx_impl {
char * vbuffer[];
};
+struct slbt_archive_ctx_impl {
+ const char * path;
+ struct slbt_raw_archive map;
+ struct slbt_archive_meta * meta;
+ struct slbt_archive_ctx actx;
+};
+
static inline struct slbt_driver_ctx_impl * slbt_get_driver_ictx(const struct slbt_driver_ctx * dctx)
{
uintptr_t addr;
@@ -153,6 +164,19 @@ static inline struct slbt_driver_ctx_impl * slbt_get_driver_ictx(const struct sl
return 0;
}
+static inline void slbt_driver_set_arctx(
+ const struct slbt_driver_ctx * dctx,
+ const struct slbt_archive_ctx * arctx,
+ const char * arpath)
+{
+ struct slbt_driver_ctx_impl * ictx;
+
+
+ ictx = slbt_get_driver_ictx(dctx);
+ ictx->arctx = arctx;
+ ictx->arpath = arpath;
+}
+
static inline char ** slbt_driver_envp(const struct slbt_driver_ctx * dctx)
{
struct slbt_driver_ctx_impl * ictx;