summaryrefslogtreecommitdiffhomepage
path: root/src/ldso
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-06-09 08:32:02 +0000
committermidipix <writeonce@midipix.org>2018-06-09 17:25:49 -0400
commit97b12cf730c0d0844945649c9c22a3f815eb647e (patch)
tree70291426f61b67b994d9160d857878ae8888469e /src/ldso
parentc95b4a077b7098eb5c6d558740d8464bb4163b53 (diff)
downloadpemagine-97b12cf730c0d0844945649c9c22a3f815eb647e.tar.bz2
pemagine-97b12cf730c0d0844945649c9c22a3f815eb647e.tar.xz
ldso: pe_load_framework_loader_ex(): rec. val of prev loader and root handles.
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/pe_load_framework_loader_ex.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ldso/pe_load_framework_loader_ex.c b/src/ldso/pe_load_framework_loader_ex.c
index 25428aa..cd3d8e6 100644
--- a/src/ldso/pe_load_framework_loader_ex.c
+++ b/src/ldso/pe_load_framework_loader_ex.c
@@ -31,6 +31,8 @@ int32_t pe_load_framework_loader_ex(
abi);
if (status) {
+ rtdata = &context;
+
context.hself = 0;
context.hparent = 0;
context.himage = 0;
@@ -55,7 +57,16 @@ int32_t pe_load_framework_loader_ex(
context.abi.data4[6] = abi->data4[6];
context.abi.data4[7] = abi->data4[7];
- rtdata = &context;
+ context.hldrctx[PE_LDSO_CTX_IDX_PREV_LOADER] = 0;
+ context.hldrctx[PE_LDSO_CTX_IDX_PREV_ROOT] = 0;
+
+ if (__SIZEOF_POINTER__ == 8) {
+ context.hldrctx[PE_LDSO_CTX_IDX_RESERVED_1] = 0;
+ context.hldrctx[PE_LDSO_CTX_IDX_RESERVED_2] = 0;
+ }
+ } else {
+ rtdata->hldrctx[PE_LDSO_CTX_IDX_PREV_LOADER] = rtdata->hloader;
+ rtdata->hldrctx[PE_LDSO_CTX_IDX_PREV_ROOT] = rtdata->hroot;
}
if ((status = pe_find_framework_loader(