aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-05-13 14:41:18 +0000
committerNick Clifton <nickc@redhat.com>2004-05-13 14:41:18 +0000
commit0da76f83eb29135ae1bd52ba5962721fb1d0c6fc (patch)
tree216775d9b34d02cfc91fa714163ab9703a49577f /bfd/elf-eh-frame.c
parent4b363073298671c9a2a096d2ba70dd7586315c4c (diff)
downloadgdb-0da76f83eb29135ae1bd52ba5962721fb1d0c6fc.zip
gdb-0da76f83eb29135ae1bd52ba5962721fb1d0c6fc.tar.gz
gdb-0da76f83eb29135ae1bd52ba5962721fb1d0c6fc.tar.bz2
Handle dwarf3 format CIE entries.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index d3777b4..7608e77 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
/* .eh_frame section optimization.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -410,7 +410,7 @@ _bfd_elf_discard_section_eh_frame
cie.version = *buf++;
/* Cannot handle unknown versions. */
- if (cie.version != 1)
+ if (cie.version != 1 && cie.version != 3)
goto free_no_table;
if (strlen (buf) > sizeof (cie.augmentation) - 1)
goto free_no_table;
@@ -434,7 +434,10 @@ _bfd_elf_discard_section_eh_frame
ports this will not matter as the value will be less than 128.
For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
which conforms to the DWARF3 standard. */
- read_uleb128 (cie.ra_column, buf);
+ if (cie.version == 1)
+ cie.ra_column = *buf++;
+ else
+ read_uleb128 (cie.ra_column, buf);
ENSURE_NO_RELOCS (buf);
cie.lsda_encoding = DW_EH_PE_omit;
cie.fde_encoding = DW_EH_PE_omit;