aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2015-07-10 17:41:55 -0700
committerKevin Buettner <kevinb@redhat.com>2015-07-18 10:10:15 -0700
commitb4e1fd615ae6582170a6bb62d6519d586bd5347e (patch)
tree70fb8d04ff33f9c9a2e6d9fd037d0629155e4d02 /gdb/dwarf2read.c
parentce62125ee9797bc5b23745fe140506b0d64f4220 (diff)
downloadfsf-binutils-gdb-b4e1fd615ae6582170a6bb62d6519d586bd5347e.zip
fsf-binutils-gdb-b4e1fd615ae6582170a6bb62d6519d586bd5347e.tar.gz
fsf-binutils-gdb-b4e1fd615ae6582170a6bb62d6519d586bd5347e.tar.bz2
dwarf2read: Allow SEC_ALLOC sections to be located at address 0.
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 91c6a8f..f4409568 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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;
}