This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] libdwfl: Never relocate value against section zero (load address).
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 11 Dec 2014 15:13:54 +0100
- Subject: Re: [PATCH] libdwfl: Never relocate value against section zero (load address).
On Sun, 2014-12-07 at 23:45 +0100, Mark Wielaard wrote:
> This really is just a robustify patch in case section zero got the
> wrong section flags set. In that case __libdwfl_relocate_value might
> call dwfl_offline_section_address which might assert (because it isn't
> prepared to handle section zero). elf_nextscn will never see section zero.
> So be explicit in dwfl_offline_section_address and immediately assert
> when shndx is zero. And handle section zero immediately by not relocating
> the value in __libdwfl_relocate_value.
>
> +2014-12-07 Mark Wielaard <mjw@redhat.com>
> +
> + * offline.c (dwfl_offline_section_address): Assert shndx is not zero.
> + * relocate.c (__libdwfl_relocate_value): Don't relocate against
> + section zero.
I pushed this to master now.