Correctly handle the "multiple string tables" case for string resolution in the dynam...
authorYann Rouillard <yann@pleiades.fr.eu.org>
Tue, 9 Jul 2013 18:22:27 +0000 (20:22 +0200)
committerYann Rouillard <yann@pleiades.fr.eu.org>
Tue, 7 Jan 2014 14:04:35 +0000 (15:04 +0100)
commit4cbbf8bd5d4cfbb9269e9bca2a3eed2f04ce6c72
treec4daf6ec56055e7aa9fc9a99c85a65c0b2d4980d
parenta1d968102e82fea06692c367849bc25418780f77
Correctly handle the "multiple string tables" case for string resolution in the dynamic section

The index of the string table section used to resolve various strings in the
dynamic section is given by the sh_link field in the dynamic section header.
As several string tables with the same name can co-exist in an elf file
we must explicitely look for this specific string table instead of
looking for the first string table in the file.
elftools/elf/dynamic.py
test/test_double_dynstr_section.py [new file with mode: 0644]
test/testfiles_for_unittests/lib_with_two_dynstr_sections.so.1.elf [new file with mode: 0755]
test/testfiles_for_unittests/lib_with_two_dynstr_sections_reversed.so.1.elf [new file with mode: 0755]