summaryrefslogtreecommitdiff
path: root/libdw/libdw_form.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-10-23 13:07:39 +0000
committerRoland McGrath <roland@redhat.com>2007-10-23 13:07:39 +0000
commite4c22ea004c02a58f5db5eb53794275344c17958 (patch)
treeec3713d305f8e9f05b15d29240accc71e98998c5 /libdw/libdw_form.c
parent98c5ead4ad9fbf96ad3b54d8ca26e354ddc3398d (diff)
downloadelfutils-e4c22ea004c02a58f5db5eb53794275344c17958.tar.gz
2007-10-23 Roland McGrath <roland@redhat.com>
* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel module to appear first.
Diffstat (limited to 'libdw/libdw_form.c')
-rw-r--r--libdw/libdw_form.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdw/libdw_form.c b/libdw/libdw_form.c
index 779b6c0e..ad78f4b4 100644
--- a/libdw/libdw_form.c
+++ b/libdw/libdw_form.c
@@ -1,5 +1,5 @@
/* Helper functions for form handling.
- Copyright (C) 2003, 2004, 2006 Red Hat, Inc.
+ Copyright (C) 2003, 2004, 2006, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -73,8 +73,11 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, unsigned int form,
result = cu->address_size;
break;
- case DW_FORM_strp:
case DW_FORM_ref_addr:
+ result = cu->version == 2 ? cu->address_size : cu->offset_size;
+ break;
+
+ case DW_FORM_strp:
result = cu->offset_size;
break;