Add ARCH_HAVE_DYNLINK_DONE
diff --git a/breakpoints.c b/breakpoints.c
index 55e1c78..07430af 100644
--- a/breakpoints.c
+++ b/breakpoints.c
@@ -347,6 +347,7 @@
return;
delete_breakpoint(proc, bp->super.addr);
linkmap_init(proc, bp->dyn_addr);
+ arch_dynlink_done(proc);
}
int
diff --git a/common.h b/common.h
index 7c47139..b57a4c1 100644
--- a/common.h
+++ b/common.h
@@ -260,4 +260,8 @@
target_address_t *entryp,
target_address_t *interp_biasp);
+/* This is called after the dynamic linker is done with the
+ * process startup. */
+void arch_dynlink_done(struct Process *proc);
+
#endif
diff --git a/proc.c b/proc.c
index 3f5789e..898861b 100644
--- a/proc.c
+++ b/proc.c
@@ -42,6 +42,13 @@
}
#endif
+#ifndef ARCH_HAVE_DYNLINK_DONE
+void
+arch_dynlink_done(struct Process *proc)
+{
+}
+#endif
+
static void add_process(struct Process *proc, int was_exec);
static int
@@ -373,8 +380,14 @@
old_ntasks = ntasks;
}
+ struct Process *leader = pid2proc(pid)->leader;
+
+ /* XXX Is there a way to figure out whether _start has
+ * actually already been hit? */
+ arch_dynlink_done(leader);
+
/* Done. Continue everyone. */
- each_task(pid2proc(pid)->leader, NULL, start_one_pid, NULL);
+ each_task(leader, NULL, start_one_pid, NULL);
}
static enum callback_status