[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] Re: static linking bug?
From: |
Joe Damato |
Subject: |
[Libunwind-devel] Re: static linking bug? |
Date: |
Mon, 7 Mar 2011 10:03:39 -0800 |
On Mon, Mar 7, 2011 at 9:57 AM, <address@hidden> wrote:
> On Wed, Feb 16, 2011 at 11:44:22PM -0800, Joe Damato wrote:
>> I get the following output:
>>
>> /usr/lib/libunwind-ptrace.a(_UPT_find_proc_info.o): In function
>> `_Ux86_64_dwarf_read_encoded_pointer':
>> (.text+0x0): multiple definition of `_Ux86_64_dwarf_read_encoded_pointer'
>> /usr/lib/libunwind-x86_64.a(Gpe.o):(.text+0x0): first defined here
>
> These symbols are never invoked directly. It should always be invoked
> through a table lookup (indirect function call).
>
> Looks like defining symbols as HIDDEN is not enough to prevent the
> linker errors. Perhaps try __attribute__((weak))?
>
>> /usr/lib/libunwind-x86_64.a(Gresume.o): In function `_Ux86_64_local_resume':
>> (.text+0x100): undefined reference to `_Ux86_64_setcontext'
>> collect2: ld returned 1 exit status
>
> Yeah - this is currently unimplemented on x86 for UNW_REMOTE. We'll need
> something along the lines of:
>
> ia64/Gresume.c:remote_install_cursor()
Thanks for the response. I realized that I had forgotten how static
linking works and once I rearranged the linker line everything worked.
-lunwind -lunwind-x86_64 -lunwind-ptrace became -lunwind-ptrace
-lunwind-x86_64 -lunwind and my app linked.
thanks,
joe