summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-25 09:36:24 -0500
committermidipix <writeonce@midipix.org>2017-12-25 09:36:24 -0500
commit962692a1c7c1d534c2e2daa93de1db5933ae61bf (patch)
treeb4d19980ca19113434d879b7f8eb348b1203c6e4
parentd32d30fc2e2717458dc441aea2c840c04d6b21e5 (diff)
downloadmmglue-962692a1c7c1d534c2e2daa93de1db5933ae61bf.tar.bz2
mmglue-962692a1c7c1d534c2e2daa93de1db5933ae61bf.tar.xz
__libc_entry_routine(): provide executable and libc reference addresses.
-rw-r--r--arch/nt32/src/crt_glue.c2
-rw-r--r--arch/nt64/src/crt_glue.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/nt32/src/crt_glue.c b/arch/nt32/src/crt_glue.c
index d09ffd2..c5af4b0 100644
--- a/arch/nt32/src/crt_glue.c
+++ b/arch/nt32/src/crt_glue.c
@@ -65,6 +65,8 @@ void __libc_entry_routine(
/* ctx init */
ctx.size = sizeof(ctx);
ctx.options = options;
+ ctx.refaddr = __main;
+ ctx.libcaddr = _init;
ctx.ctty = __ctty;
ctx.pthread_create_fn = pthread_create;
ctx.pthread_surrogate_fn= __pthread_surrogate_init;
diff --git a/arch/nt64/src/crt_glue.c b/arch/nt64/src/crt_glue.c
index d09ffd2..c5af4b0 100644
--- a/arch/nt64/src/crt_glue.c
+++ b/arch/nt64/src/crt_glue.c
@@ -65,6 +65,8 @@ void __libc_entry_routine(
/* ctx init */
ctx.size = sizeof(ctx);
ctx.options = options;
+ ctx.refaddr = __main;
+ ctx.libcaddr = _init;
ctx.ctty = __ctty;
ctx.pthread_create_fn = pthread_create;
ctx.pthread_surrogate_fn= __pthread_surrogate_init;