summaryrefslogtreecommitdiff
path: root/binutils/readelf.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
commit1d4e66cfb6fc42fb1d484ea0f0ff97f07e364966 (patch)
treea04bff9317413a051b7e29286aa47601993043bb /binutils/readelf.c
parent59e4e89217c1d4a12a3c479d80216da14d6da61b (diff)
downloadbinutils-redhat-1d4e66cfb6fc42fb1d484ea0f0ff97f07e364966.tar.gz
Handle dwarf3 format CIE entries.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 1c4e57dcb8..569c7f2379 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1,5 +1,5 @@
/* readelf.c -- display contents of an ELF format file
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
@@ -8968,7 +8968,14 @@ display_debug_frames (Elf_Internal_Shdr *section,
{
fc->code_factor = LEB ();
fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
augmentation_data_len = LEB ();
augmentation_data = start;
start += augmentation_data_len;
@@ -8978,13 +8985,27 @@ display_debug_frames (Elf_Internal_Shdr *section,
start += addr_size;
fc->code_factor = LEB ();
fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
}
else
{
fc->code_factor = LEB ();
fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
}
cie = fc;