summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-22 02:12:42 +0000
committermidipix <writeonce@midipix.org>2024-03-22 03:51:35 +0000
commit3077bbe7e2fc80610902dda18cc5a373bca61557 (patch)
tree318a2c6f843bb828323aa186a4b9914cd3d7e00e
parent86d1f469469346171c90dfa1b399ce10d2497564 (diff)
downloadslibtool-3077bbe7e2fc80610902dda18cc5a373bca61557.tar.bz2
slibtool-3077bbe7e2fc80610902dda18cc5a373bca61557.tar.xz
slbt_ar_update_syminfo(): eliminate the execution context argument.
-rw-r--r--src/arbits/slbt_archive_dlsyms.c2
-rw-r--r--src/arbits/slbt_archive_syminfo.c13
-rw-r--r--src/internal/slibtool_ar_impl.h3
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_argv.c2
-rw-r--r--src/logic/slbt_exec_ctx.c4
5 files changed, 10 insertions, 14 deletions
diff --git a/src/arbits/slbt_archive_dlsyms.c b/src/arbits/slbt_archive_dlsyms.c
index 942de3c..ed07602 100644
--- a/src/arbits/slbt_archive_dlsyms.c
+++ b/src/arbits/slbt_archive_dlsyms.c
@@ -430,7 +430,7 @@ static int slbt_ar_create_dlsyms_impl(
return SLBT_NESTED_ERROR(dctx);
if (!mctx->syminfo)
- if (slbt_ar_update_syminfo(*actx,ectx) < 0)
+ if (slbt_ar_update_syminfo(*actx) < 0)
return SLBT_NESTED_ERROR(dctx);
}
diff --git a/src/arbits/slbt_archive_syminfo.c b/src/arbits/slbt_archive_syminfo.c
index ee5cc30..a7242a2 100644
--- a/src/arbits/slbt_archive_syminfo.c
+++ b/src/arbits/slbt_archive_syminfo.c
@@ -71,7 +71,6 @@ static void slbt_ar_update_syminfo_child(
static int slbt_obtain_nminfo(
struct slbt_archive_ctx_impl * ictx,
- struct slbt_exec_ctx * ectx,
const struct slbt_driver_ctx * dctx,
struct slbt_archive_meta_impl * mctx)
{
@@ -79,6 +78,7 @@ static int slbt_obtain_nminfo(
int fdcwd;
pid_t pid;
pid_t rpid;
+ int ecode;
int fdout;
char ** argv;
char arname [PATH_MAX];
@@ -125,17 +125,15 @@ static int slbt_obtain_nminfo(
program,arname,fdout);
/* parent */
- ectx->pid = pid;
-
rpid = waitpid(
pid,
- &ectx->exitcode,
+ &ecode,
0);
if (rpid < 0) {
return SLBT_SYSTEM_ERROR(dctx,0);
- } else if (ectx->exitcode) {
+ } else if (ecode) {
return SLBT_CUSTOM_ERROR(
dctx,
SLBT_ERR_FLOW_ERROR);
@@ -264,8 +262,7 @@ static int slbt_coff_qsort_syminfo_cmp(const void * a, const void * b)
}
slbt_hidden int slbt_ar_update_syminfo(
- struct slbt_archive_ctx * actx,
- struct slbt_exec_ctx * ectx)
+ struct slbt_archive_ctx * actx)
{
const struct slbt_driver_ctx * dctx;
struct slbt_archive_ctx_impl * ictx;
@@ -280,7 +277,7 @@ slbt_hidden int slbt_ar_update_syminfo(
/* nm -P -A -g */
if (mctx->armaps.armap_nsyms) {
- if (slbt_obtain_nminfo(ictx,ectx,dctx,mctx) < 0)
+ if (slbt_obtain_nminfo(ictx,dctx,mctx) < 0)
return SLBT_NESTED_ERROR(dctx);
} else {
if (slbt_lib_get_txtfile_ctx(
diff --git a/src/internal/slibtool_ar_impl.h b/src/internal/slibtool_ar_impl.h
index d311774..990bb07 100644
--- a/src/internal/slibtool_ar_impl.h
+++ b/src/internal/slibtool_ar_impl.h
@@ -78,8 +78,7 @@ int slbt_update_mapstrv(
struct slbt_archive_meta_impl * m);
int slbt_ar_update_syminfo(
- struct slbt_archive_ctx * actx,
- struct slbt_exec_ctx * ectx);
+ struct slbt_archive_ctx * actx);
static inline struct slbt_archive_meta_impl * slbt_archive_meta_ictx(const struct slbt_archive_meta * meta)
{
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c
index 0209201..013317f 100644
--- a/src/logic/linkcmd/slbt_linkcmd_argv.c
+++ b/src/logic/linkcmd/slbt_linkcmd_argv.c
@@ -976,7 +976,7 @@ slbt_hidden int slbt_exec_link_finalize_argument_vector(
arctx = *arctxv;
arctx->path = &slbt_ar_self_dlunit;
- if (slbt_ar_update_syminfo(arctx,ectx) < 0)
+ if (slbt_ar_update_syminfo(arctx) < 0)
return SLBT_NESTED_ERROR(dctx);
/* regenerate the dlsyms vtable source */
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index 0ddc9b9..223be17 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -636,7 +636,7 @@ int slbt_ectx_get_exec_ctx(
ictx,
SLBT_NESTED_ERROR(dctx));
- if (slbt_ar_update_syminfo(*dlactxv,&ictx->ctx) < 0)
+ if (slbt_ar_update_syminfo(*dlactxv) < 0)
return slbt_ectx_free_exec_ctx_impl(
ictx,
SLBT_NESTED_ERROR(dctx));
@@ -682,7 +682,7 @@ int slbt_ectx_get_exec_ctx(
}
if (fpreopen) {
- if (slbt_ar_update_syminfo(*dlactxv,&ictx->ctx) < 0)
+ if (slbt_ar_update_syminfo(*dlactxv) < 0)
return slbt_ectx_free_exec_ctx_impl(
ictx,
SLBT_NESTED_ERROR(dctx));