My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3396: arm-eabi-gdb load sharedlibrary at the wrong address
1 person starred this issue and may be notified of changes. Back to list
Status:  Obsolete
Owner:  ----
Closed:  May 2013


Sign in to add a comment
 
Reported by ruohong....@gmail.com, Jul 27, 2009
- Steps to reproduce the problem
Use arm-eabi-gdb to debug sharedlibrary. For example, libhardware.so,
libm.so, liblog.so.
Use info share to check the loading address. I got wrong address like
0xfff?????. Then I can't set breakpoint & trace in such libraries.

- Sample source code demonstrating the problem
Debugging any application needed such library can reproduce this issue.

- What you think the correct behavior should be.
I check android-toolchain-20081019 code. There should be 2 problems in 
android-toolchain-20081019/gdb-6.6/gdb/solib-svr4.c
1. In function LM_ADDR_CHECK, LM_DYNAMIC_FROM_LINK_MAP (so) will return 0
for l_dynaddr;
2. The logic to adjust l_addr has some problem. When I comment it as the
following
#if 0
if ((l_addr & align) == 0 && ((dynaddr - l_dynaddr) & align) == 0)
{
      l_addr = l_dynaddr - dynaddr;
      warning (_(".dynamic section for \"%s\" "
         "is not at the expected address"), so->so_name);
      warning (_("difference appears to be caused by prelink, "
	 "adjusting expectations"));
}
else
#endif
   warning (_(".dynamic section for \"%s\" "
       "is not at the expected address "
       "(wrong library or version mismatch?)"), so->so_name);
   warning (_("dynaddr=0x%x l_addr=0x%x l_dynaddr=0x%x"), dynaddr, l_addr,
l_dynaddr);
The library can be loaded at the right address though .dynamic section is
not at the expected address.

Regards,
Jill
infoshare.png
207 KB   View   Download
Aug 25, 2009
#1 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: Component-Tools
Jan 15, 2011
#2 ralf%and...@gtempaccount.com
(No comment was entered for this change.)
Status: Unassigned
Labels: -Component-Tools Component-Build
May 31, 2013
#3 jbq@android.com
(No comment was entered for this change.)
Status: Obsolete
Sign in to add a comment

Powered by Google Project Hosting