aboutsummaryrefslogtreecommitdiff
path: root/contrib/gdb
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-03-22 04:44:51 +0000
committerBruce Evans <bde@FreeBSD.org>1997-03-22 04:44:51 +0000
commitf90e4276f212c044404d7322258c4d4649b02037 (patch)
tree2f1d78ebc4159a71ba1c932703f5c0c0e53e74eb /contrib/gdb
parent8e56e5613435445ce072140412028eeac07fefa0 (diff)
downloadsrc-f90e4276f212c044404d7322258c4d4649b02037.tar.gz
src-f90e4276f212c044404d7322258c4d4649b02037.zip
Notes
Diffstat (limited to 'contrib/gdb')
-rw-r--r--contrib/gdb/gdb/objfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/gdb/gdb/objfiles.c b/contrib/gdb/gdb/objfiles.c
index 97b05dce3f1b..e70ddbe310cb 100644
--- a/contrib/gdb/gdb/objfiles.c
+++ b/contrib/gdb/gdb/objfiles.c
@@ -83,6 +83,12 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
section.objfile = objfile;
section.the_bfd_section = asect;
section.addr = bfd_section_vma (abfd, asect);
+#ifdef __FreeBSD__
+ /* 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);
+#endif
section.endaddr = section.addr + bfd_section_size (abfd, asect);
obstack_grow (&objfile->psymbol_obstack, (char *) &section, sizeof(section));
objfile->sections_end = (struct obj_section *) (((unsigned long) objfile->sections_end) + 1);