dwarf2read: Allow SEC_ALLOC sections to be located at address 0.
authorKevin Buettner <kevinb@redhat.com>
Sat, 11 Jul 2015 00:41:55 +0000 (17:41 -0700)
committerKevin Buettner <kevinb@redhat.com>
Sat, 18 Jul 2015 17:10:15 +0000 (10:10 -0700)
GDB already allows statically initialized variables, located in
SEC_LOAD sections, to be placed at address 0.  This change allows
uninitialized variables (which are in SEC_ALLOC sections) to be placed
address 0 as well.

gdb/ChangeLog:

* dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
to be set for SEC_ALLOC sections too.

gdb/ChangeLog
gdb/dwarf2read.c

index 3bd64ab16f893b201e7965ea578668e2b27c42ce..7f31ff58c9a06f74396f6678879d52a5637dc358 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-18  Kevin Buettner  <kevinb@redhat.com>
+
+       * dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
+       to be set for SEC_ALLOC sections too.
+
 2015-07-17  Yao Qi  <yao.qi@linaro.org>
 
        * Makefile.in (HFILES_NO_SRCDIR): Add
index 91c6a8feeee4c70c7fbad920aa79f2926c389216..f44095683fb03b6d0d5fb4c912ecfebc5f31859c 100644 (file)
@@ -2241,7 +2241,7 @@ dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames)
       dwarf2_per_objfile->gdb_index.size = bfd_get_section_size (sectp);
     }
 
-  if ((bfd_get_section_flags (abfd, sectp) & SEC_LOAD)
+  if ((bfd_get_section_flags (abfd, sectp) & (SEC_LOAD | SEC_ALLOC))
       && bfd_section_vma (abfd, sectp) == 0)
     dwarf2_per_objfile->has_section_at_zero = 1;
 }
This page took 0.047338 seconds and 4 git commands to generate.