* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
Move the SEC_HAS_CONTENTS check here - for any NAMES use.
(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
here.
+2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
+ Move the SEC_HAS_CONTENTS check here - for any NAMES use.
+ (dwarf2_locate_sections) <eh_frame>: Move the variable and check from
+ here.
+
2012-08-27 Wei-cheng Wang <cole945@gmail.com>
* memattr.c (create_mem_region): Fix memory region overlapping
2012-08-27 Wei-cheng Wang <cole945@gmail.com>
* memattr.c (create_mem_region): Fix memory region overlapping
dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames)
{
const struct dwarf2_debug_sections *names;
dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames)
{
const struct dwarf2_debug_sections *names;
+ flagword aflag = bfd_get_section_flags (abfd, sectp);
if (vnames == NULL)
names = &dwarf2_elf_names;
else
names = (const struct dwarf2_debug_sections *) vnames;
if (vnames == NULL)
names = &dwarf2_elf_names;
else
names = (const struct dwarf2_debug_sections *) vnames;
- if (section_is_p (sectp->name, &names->info))
+ if ((aflag & SEC_HAS_CONTENTS) == 0)
+ {
+ }
+ else if (section_is_p (sectp->name, &names->info))
{
dwarf2_per_objfile->info.asection = sectp;
dwarf2_per_objfile->info.size = bfd_get_section_size (sectp);
{
dwarf2_per_objfile->info.asection = sectp;
dwarf2_per_objfile->info.size = bfd_get_section_size (sectp);
}
else if (section_is_p (sectp->name, &names->eh_frame))
{
}
else if (section_is_p (sectp->name, &names->eh_frame))
{
- flagword aflag = bfd_get_section_flags (abfd, sectp);
-
- if (aflag & SEC_HAS_CONTENTS)
- {
- dwarf2_per_objfile->eh_frame.asection = sectp;
- dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp);
- }
+ dwarf2_per_objfile->eh_frame.asection = sectp;
+ dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp);
}
else if (section_is_p (sectp->name, &names->ranges))
{
}
else if (section_is_p (sectp->name, &names->ranges))
{