This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: warning: Could not load shared library symbols for linux-vdso.so.1.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 12 Aug 2016 11:28:32 +0100
- Subject: Re: warning: Could not load shared library symbols for linux-vdso.so.1.
- Authentication-results: sourceware.org; auth=none
- References: <86twercyuv.fsf@gmail.com> <89b5bdc8-0be2-538e-3932-1f5d4a1bc1e8@redhat.com>
Pedro Alves <palves@redhat.com> writes:
> Is there an easy way to check whether we're in the vdso prelinked
> situation just from doing some address comparisions? I feel like that
> should be possible, but I didn't think it through. It is is indeed
> possible, we could alwayy skip the /proc/pid/maps parsing entirely
> even against live processes, on modern kernels.
I don't know either. However, looks vDSO prelink is done only on x86
and was already removed from kernel in 2014, as far as I can see. The
base address of vDSO in kernel is VDSO_PRELINK, which is hard-coded. I
am not sure we can rely on this hard-coded constant.
> - if (address_in_mem_range (so->lm_info->l_ld, &vsyscall_range))
> + if (vsyscall_range.length != 0
> + && address_in_mem_range (so->lm_info->l_ld, &vsyscall_range))
> + {
> + *sop = so->next;
> + free_so (so);
> + break;
> + }
> +
> + /* However, if we only know the starting address address,
> + try a simple match. XXX: Is there an easy "SO is
> + prelinked" check we could do here? */
> + if (vsyscall_range.length == 0
> + && so->lm_info->l_addr_inferior == vsyscall_range.start)
> {
> *sop = so->next;
> free_so (so);
Patch is good to me. One nit, we can merge these two condition checks,
so we can delete SO in the list in one place.
--
Yao (齐尧)