diff --git a/contrib/gdb/gdb/objfiles.c b/contrib/gdb/gdb/objfiles.c index e70ddbe310cb..1d2260ff5713 100644 --- a/contrib/gdb/gdb/objfiles.c +++ b/contrib/gdb/gdb/objfiles.c @@ -87,7 +87,8 @@ add_to_objfile_sections (abfd, asect, objfile_p_char) /* XXX perhaps this should be in bfd_section_vma (), but it wouldn't even compile there, since a bfd pointer isn't actually passed in all invocations of bfd_section_vma (). */ - section.addr += bfd_get_start_address (abfd); + if (kernel_debugging) + section.addr += bfd_get_start_address (abfd); #endif section.endaddr = section.addr + bfd_section_size (abfd, asect); obstack_grow (&objfile->psymbol_obstack, (char *) §ion, sizeof(section));