coredump.c: del multiple behavior

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-10-15 15:15:49 +08:00 committed by Xiang Xiao
parent c3506448c2
commit 2beef702cc
1 changed files with 1 additions and 2 deletions

View File

@ -554,7 +554,6 @@ static void elf_emit_tcb_phdr(FAR struct elf_dumpinfo_s *cinfo,
phdr->p_paddr = phdr->p_vaddr;
phdr->p_memsz = phdr->p_filesz;
phdr->p_flags = PF_X | PF_W | PF_R;
phdr->p_align = ELF_PAGESIZE;
*offset += ROUNDUP(phdr->p_memsz, ELF_PAGESIZE);
elf_emit(cinfo, phdr, sizeof(*phdr));
@ -585,6 +584,7 @@ static void elf_emit_phdr(FAR struct elf_dumpinfo_s *cinfo,
elf_emit(cinfo, &phdr, sizeof(phdr));
phdr.p_align = ELF_PAGESIZE;
if (cinfo->pid == INVALID_PROCESS_ID)
{
for (i = 0; i < g_npidhash; i++)
@ -612,7 +612,6 @@ static void elf_emit_phdr(FAR struct elf_dumpinfo_s *cinfo,
phdr.p_filesz = cinfo->regions[i].end - cinfo->regions[i].start;
phdr.p_memsz = phdr.p_filesz;
phdr.p_flags = cinfo->regions[i].flags;
phdr.p_align = ELF_PAGESIZE;
offset += ROUNDUP(phdr.p_memsz, ELF_PAGESIZE);
elf_emit(cinfo, &phdr, sizeof(phdr));
}