libdwfl: Never relocate value against section zero (load address).
authorMark Wielaard <mjw@redhat.com>
Sun, 7 Dec 2014 19:26:56 +0000 (20:26 +0100)
committerMark Wielaard <mjw@redhat.com>
Thu, 11 Dec 2014 14:11:53 +0000 (15:11 +0100)
commit27304cb338070ef53ee3db61e3e50cd57efe243a
treea6caccec34eeed989d04226d38cee80311c428e6
parentcb73b5a015606a02f952f7eddaba15327f6191fa
libdwfl: Never relocate value against section zero (load address).

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.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdwfl/ChangeLog
libdwfl/offline.c
libdwfl/relocate.c