diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-06-26 21:20:39 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-06-26 21:20:39 +0000 |
commit | b6ce8a98c5fe7103ec9ec8359e40adc7e35f3ef8 (patch) | |
tree | cd5b88c440df1465791137e753cbfea2d54533fb /gdb/dwarf2read.c | |
parent | 65470a6cbeb11011f30dc8f86c488c3fa6f20bc0 (diff) | |
download | gdb-b6ce8a98c5fe7103ec9ec8359e40adc7e35f3ef8.tar.gz |
2003-06-26 Elena Zannoni <ezannoni@redhat.com>
* dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame
sections.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 55b335da9d9..1d68efffbd3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1021,9 +1021,13 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) } else if (STREQ (sectp->name, EH_FRAME_SECTION)) { - dwarf_eh_frame_offset = sectp->filepos; - dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); - dwarf_eh_frame_section = sectp; + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_offset = sectp->filepos; + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } } else if (STREQ (sectp->name, RANGES_SECTION)) { |