summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_getlocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/dwarf_getlocation.c')
-rw-r--r--libdw/dwarf_getlocation.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c
index f513f3ae..cefd052b 100644
--- a/libdw/dwarf_getlocation.c
+++ b/libdw/dwarf_getlocation.c
@@ -1,5 +1,5 @@
/* Return location expression list.
- Copyright (C) 2000, 2001, 2002, 2004, 2005 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <[email protected]>, 2000.
@@ -472,8 +472,12 @@ dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs)
&base) != 0)
{
if (INTUSE(dwarf_errno) () == 0)
- goto invalid;
- return -1;
+ /* The compiler provided no base address when it should
+ have. Buggy GCC does this when it used absolute
+ addresses in the location list and no DW_AT_ranges. */
+ base = 0;
+ else
+ return -1;
}
}