The same work needs to be done on attach as when _start is hit

- Extract the logic to a separate function, called from open_pid and
  entry_breakpoint_on_hit.

- Since there is no other way to get on dyn_addr in open_pid anyway,
  simply look for the main library, and read it there.  That means we
  don't need to track that information at entry_breakpoint anymore,
  and we can get rid of struct entry_breakpoint.
diff --git a/proc.h b/proc.h
index e46b235..e8032fa 100644
--- a/proc.h
+++ b/proc.h
@@ -181,6 +181,10 @@
 
 void change_process_leader(struct process *proc, struct process *leader);
 
+/* Prepare those parts of process initialization that need to be done
+ * after _start is hit (i.e. after dynamic linking was done).  */
+void process_hit_start(struct process *proc);
+
 /* Remove process from the list of traced processes, drop any events
  * in the event queue, destroy it and free memory.  */
 void remove_process(struct process *proc);