aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2006-10-27 12:32:48 +0000
committerjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2006-10-27 12:32:48 +0000
commitd341c252dd7570396a6c147ef2b557bfe99bc24e (patch)
tree36f29c3250471496da097b71dfb7bbd3c06241e5
parentc47b22a6e58b97b9300e9732e3f4e8b151f548ff (diff)
downloadprelink-cross-d341c252dd7570396a6c147ef2b557bfe99bc24e.tar.gz
prelink-cross-d341c252dd7570396a6c147ef2b557bfe99bc24e.tar.bz2
prelink-cross-d341c252dd7570396a6c147ef2b557bfe99bc24e.zip
* src/prelink.h (PLArch): Add an arch_adjust callback.
* src/dso.c (adjust_dso): Use it, if defined. git-svn-id: http://sourceware.org/svn/prelink@139 94c539fb-cf18-0410-b60f-edeeb537fa16
-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);