[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] [PATCH 3/7] Fix issue with resolving relative addr
From: |
Anderson Lizardo |
Subject: |
Re: [Libunwind-devel] [PATCH 3/7] Fix issue with resolving relative addresses for prelinked libraries |
Date: |
Wed, 25 Jun 2008 08:51:31 -0400 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
ext Daniel Jacobowitz wrote:
> On Wed, Jun 25, 2008 at 07:51:10AM -0400, Anderson Lizardo wrote:
>> When a library is prelinked, its section addresses are already absolute. This
>> patch checks for prelinked libraries by looking at the virtual address of the
>> PT_LOAD entry that has an offset equal to zero. If it is not zero, it means
>> the
>> library is prelinked.
>>
>> Note that this only affects remote backtrace for ARM, because it fills the
>> struct dl_phdr_info manually with information from tdep_get_elf_image().
>
> This check is not in general correct. Libraries can be linked at any
> p_vaddr. 0 is traditional on most platforms, but for many years MIPS
> libraries were linked at 0x5ffe0000. Also, if prelink loading fails
> then glibc will relocate libraries despite their absolute addresses.
>
> It sounds to me like the data you're synthesizing from on-disk needs
> to be adjusted.
Do you have any suggestions on how to reliably calculate absolute
addresses? An alternative approach I have in mind is to peek directly at
the linker structures, like it's done by GDB. Is that the only feasible
general solution to the issue?
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia (INdT)
Manaus - Brazil
- Re: [Libunwind-devel] [PATCH 7/7] Implement _UPTi_find_unwind_table() for ARM, (continued)
- [Libunwind-devel] [PATCH 2/7] Change debuglink lookup order, Anderson Lizardo, 2008/06/25
- [Libunwind-devel] [PATCH 1/7] ARM: add missing register offsets, Anderson Lizardo, 2008/06/25
- [Libunwind-devel] [PATCH 3/7] Fix issue with resolving relative addresses for prelinked libraries, Anderson Lizardo, 2008/06/25
- [Libunwind-devel] [PATCH 4/7] Add path and pathlen arguments to tdep_get_elf_image(), Anderson Lizardo, 2008/06/25
- Re: [Libunwind-devel] [PATCH 0/7] ARM: add remote backtrace support, Daniel Jacobowitz, 2008/06/25