libelf: elf_update should make sure section zero exists
elf_update might crash for 65280+ sections when section zero headers
aren't loaded. Make sure section zero is loaded before trying to write
to it.
Add testcase to tests/test-manyfuncs.c but use ELF_C_READ_MMAP_PRIVATE
to workaround https://sourceware.org/bugzilla/show_bug.cgi?id=33968
* libelf/elf32_updatenull.c (updatenull_wrlock): Call
getshdr_wrlock to load shdr.
* tests/test-manyfuncs.c (check_elf): Use elf_begin with
ELF_C_READ_MMAP_PRIVATE if use_mmap. Call elf_update early.