public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Fix various issues with ELF files containing many sections
@ 2018-09-13 23:01 Mark Wielaard
  2018-09-13 23:02 ` [PATCH 09/10] readelf: Use elf_getshdrnum in print_shdr and print_phdr Mark Wielaard
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Mark Wielaard @ 2018-09-13 23:01 UTC (permalink / raw)
  To: elfutils-devel

Through an accident Fedora rawhide created various ELF files with thousands
of sections. This showed various issues in libelf, libdw and some of the
elfutils tools. When an ELF file has more than SHN_LORESERVE (0xff00, 65280)
sections then the Ehdr e_shnum and e_shshstrndx fields are too small to
hold the section number directly. They will then be stored in the Shdr
sh_info and sh_link fields of section zero. The following patches make sure
the correct values are read and setup. Various test cases have been added
that create files with ten thousand sections to check everything works
as expected.

[PATCH 01/10] backends: Always use elf_getshdrstrndx in check_special_symbol
[PATCH 02/10] backends: Use elf_getshdrstrndx to find .odp section in ppc64_init
[PATCH 03/10] libebl: Use elf_getshdrstrndx in ebl_section_strip_p
[PATCH 04/10] elfcmp: Get, check and shdrstrndx for section names
[PATCH 05/10] libelf: Fix shnum and section zero handling
[PATCH 06/10] elflint: Use shnum and shstrndx instead of ehdr field directly
[PATCH 07/10] libdw: dwarf_begin_elf should use elf_getshdrstrndx to get names
[PATCH 08/10] strip,unstrip: Use and set shdrstrndx consistently
[PATCH 09/10] readelf: Use elf_getshdrnum in print_shdr and print_phdr
[PATCH 10/10] libdwfl: Document core memory and remote memory ELF shdrs reading

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-09-13 23:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13 23:01 Fix various issues with ELF files containing many sections Mark Wielaard
2018-09-13 23:02 ` [PATCH 09/10] readelf: Use elf_getshdrnum in print_shdr and print_phdr Mark Wielaard
2018-09-13 23:02 ` [PATCH 07/10] libdw: dwarf_begin_elf should use elf_getshdrstrndx to get section names Mark Wielaard
2018-09-13 23:02 ` [PATCH 01/10] backends: Always use elf_getshdrstrndx in check_special_symbol Mark Wielaard
2018-09-13 23:02 ` [PATCH 04/10] elfcmp: Get, check and shdrstrndx for section names Mark Wielaard
2018-09-13 23:02 ` [PATCH 06/10] elflint: Use shnum and shstrndx instead of ehdr field directly Mark Wielaard
2018-09-13 23:02 ` [PATCH 02/10] backends: Use elf_getshdrstrndx to find .odp section in ppc64_init Mark Wielaard
2018-09-13 23:02 ` [PATCH 10/10] libdwfl: Document core memory and remote memory ELF shdrs reading Mark Wielaard
2018-09-13 23:02 ` [PATCH 05/10] libelf: Fix shnum and section zero handling Mark Wielaard
2018-09-13 23:02 ` [PATCH 03/10] libebl: Use elf_getshdrstrndx in ebl_section_strip_p Mark Wielaard
2018-09-13 23:02 ` [PATCH 08/10] strip,unstrip: Use and set shdrstrndx consistently Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).