summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--trunk/ChangeLog3
-rw-r--r--trunk/src/dso.c4
-rw-r--r--trunk/src/prelink.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
index a72cf9b..3f70894 100644
--- a/trunk/ChangeLog
+++ b/trunk/ChangeLog
@@ -1,5 +1,8 @@
2006-10-24 Richard Sandiford <richard@codesourcery.com>
+ * src/prelink.h (PLArch): Add an arch_adjust callback.
+ * src/dso.c (adjust_dso): Use it, if defined.
+
* src/prelink.h (adjust_symbol_p): Declare.
* src/dso.c (adjust_symbol_p): New function, extracted from...
(adjust_symtab): ...here.
diff --git a/trunk/src/dso.c b/trunk/src/dso.c
index fe28c9a..20dcece 100644
--- a/trunk/src/dso.c
+++ b/trunk/src/dso.c
@@ -1293,6 +1293,10 @@ adjust_dso (DSO *dso, GElf_Addr start, GElf_Addr adjust)
{
int i;
+ if (dso->arch->arch_adjust
+ && dso->arch->arch_adjust (dso, start, adjust))
+ return 1;
+
if (dso->ehdr.e_entry >= start)
{
dso->ehdr.e_entry += adjust;
diff --git a/trunk/src/prelink.h b/trunk/src/prelink.h
index 4d0518a..03128dc 100644
--- a/trunk/src/prelink.h
+++ b/trunk/src/prelink.h
@@ -121,6 +121,7 @@ struct PLArch
int R_COPY;
int R_JMP_SLOT;
int R_RELATIVE;
+ int (*arch_adjust) (DSO *dso, GElf_Addr start, GElf_Addr adjust);
int (*adjust_section) (DSO *dso, int n, GElf_Addr start, GElf_Addr adjust);
int (*adjust_dyn) (DSO *dso, int n, GElf_Dyn *dyn, GElf_Addr start,
GElf_Addr adjust);