From a366c65aeb84ae95691378b12690dea99ef94513 Mon Sep 17 00:00:00 2001 From: Chris Demetriou Date: Mon, 21 Jul 2008 05:05:23 +0000 Subject: 2008-07-20 Sergei Poselenov Chris Demetriou * elfread.c (elf_symfile_segments): Fix the check that each loadable section fits within an ELF segment to handle ELF segments that hit the end of the address space. --- gdb/elfread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/elfread.c') diff --git a/gdb/elfread.c b/gdb/elfread.c index 363702a..0b08247 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -108,7 +108,7 @@ elf_symfile_segments (bfd *abfd) for (j = 0; j < num_segments; j++) if (segments[j]->p_memsz > 0 && vma >= segments[j]->p_vaddr - && vma < segments[j]->p_vaddr + segments[j]->p_memsz) + && (vma - segments[j]->p_vaddr) < segments[j]->p_memsz) { data->segment_info[i] = j + 1; break; -- cgit v1.1