diff options
author | Filippo Arcidiacono <filippo.arcidiacono@st.com> | 2010-08-26 12:00:03 +0200 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2010-09-17 16:13:45 +0200 |
commit | b9766aa08c90b6718d5497d6a6cf9e6f737e5141 (patch) | |
tree | 3b0f3347413b9dc321ea48659d673f973b620221 /ldso/ldso/ldso.c | |
parent | a33796043bdef5345bc00a528c942f91a87af8e9 (diff) |
ldso: Fix loadaddr and mappaddr when prelink support is enabled.
Fixed loadaddr and mappaddr fields to correctly work when prelink
support is enabled.
- loadaddr is an offset relative to the first loadable segment.
- mapaddr is the address where the object has been mapped in memory.
Non PIC library detection fixed too.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r-- | ldso/ldso/ldso.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index b056f8af2..e0d323a9f 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -329,6 +329,7 @@ static struct elf_resolve * add_ldso(struct elf_resolve *tpnt, tpnt->dynamic_info, (unsigned long)tpnt->dynamic_addr, 0); + tpnt->mapaddr = load_addr; if (_dl_stat(tpnt->libname, &st) >= 0) { tpnt->st_dev = st.st_dev; tpnt->st_ino = st.st_ino; @@ -551,9 +552,6 @@ of this helper program; chances are you did not intend to run this program.\n\ app_tpnt->rtld_flags = unlazy | RTLD_GLOBAL; - if (app_tpnt->libtype == elf_executable) - app_tpnt->loadaddr = 0; - /* * This is used by gdb to locate the chain of shared libraries that are * currently loaded. |