summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-08-14 13:52:06 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:54 +0200
commit26220af2e4a3aef3ffb8c006cd197a8987107dff (patch)
tree70f378d2f6f7e9710619c44b919a9194e2185a1c /dyn_load.c
parent24a998358610e865d9d98f8fff83dc7330a1dd18 (diff)
2010-08-14 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer for 64-bit targets. * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE macro. * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS() since REAL(pthread_create) is used. * pthread_support.c (PTHREAD_CREATE): Remove unused.
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 8b5eb9d..e1f7ed4 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -485,6 +485,10 @@ STATIC int GC_register_dynlib_callback(struct dl_phdr_info * info,
break;
# ifdef PT_GNU_RELRO
if (n_load_segs >= MAX_LOAD_SEGS) ABORT("Too many PT_LOAD segs");
+# if CPP_WORDSZ == 64
+ /* start pointer value may require aligning */
+ start = (ptr_t)((word)start & ~(sizeof(word) - 1));
+# endif
load_segs[n_load_segs].start = start;
load_segs[n_load_segs].end = end;
load_segs[n_load_segs].start2 = 0;