+2009-01-21 Ulrich Drepper <drepper@redhat.com>
+
+ * elf32_updatefile.c (elfXX_updatemmap): When skipping non-NOBITS
+ sections we haven't loaded, update last_position based on scn_start,
+ not based on old value. Don't run the loop for the dummy section 0.
+ (elfXX_updatefile): Don't run the loop for the dummy section 0.
+
2009-01-10 Ulrich Drepper <drepper@redhat.com>
* libelfP.h (_): We only have one translation domain, elfutils.
for (size_t cnt = 0; cnt < shnum; ++cnt)
{
Elf_Scn *scn = scns[cnt];
+ if (scn->index == 0)
+ {
+ /* The dummy section header entry. It should not be
+ possible to make this "section" as dirty. */
+ assert ((scn->flags & ELF_F_DIRTY) == 0);
+ continue;
+ }
ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS);
dl = dl->next;
}
while (dl != NULL);
- else if (shdr->sh_type != SHT_NOBITS && scn->index != 0)
+ else if (shdr->sh_type != SHT_NOBITS)
/* We have to trust the existing section header information. */
- last_position += shdr->sh_size;
+ last_position = scn_start + shdr->sh_size;
scn->flags &= ~ELF_F_DIRTY;
}
for (size_t cnt = 0; cnt < shnum; ++cnt)
{
Elf_Scn *scn = scns[cnt];
+ if (scn->index == 0)
+ {
+ /* The dummy section header entry. It should not be
+ possible to make this "section" as dirty. */
+ assert ((scn->flags & ELF_F_DIRTY) == 0);
+ continue;
+ }
ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS);
dl = dl->next;
}
while (dl != NULL);
- else if (shdr->sh_type != SHT_NOBITS && scn->index != 0)
+ else if (shdr->sh_type != SHT_NOBITS)
last_offset = scn_start + shdr->sh_size;
/* Collect the section header table information. */