summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2006-02-27 04:53:00 +0000
committerRoland McGrath <[email protected]>2006-02-27 04:53:00 +0000
commit687d7e9bd154a4b1f22b5e3ed7c6c904e421e871 (patch)
treebab9d84d3ab7c51ff394706e87b4ab7f155de209
parent123ccad620d8e02bd925996b1843f1bf0e28fdb6 (diff)
2006-02-26 Roland McGrath <[email protected]>
* offline.c (dwfl_report_offline): Account for dwfl_report_elf having aligned up from DWFL->offline_next_address when checking for overlap.
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/offline.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 8615f0cd..82c04586 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-26 Roland McGrath <[email protected]>
+
+ * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
+ aligned up from DWFL->offline_next_address when checking for overlap.
+
2005-12-22 Roland McGrath <[email protected]>
* argp-std.c (parse_opt): Call dwfl_end in failure cases.
diff --git a/libdwfl/offline.c b/libdwfl/offline.c
index 05496399..3cf110f1 100644
--- a/libdwfl/offline.c
+++ b/libdwfl/offline.c
@@ -1,5 +1,5 @@
/* Recover relocatibility for addresses computed from debug information.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
This program is Open Source software; you can redistribute it and/or
modify it under the terms of the Open Software License version 1.0 as
@@ -60,8 +60,11 @@ dwfl_report_offline (Dwfl *dwfl, const char *name,
/* If this is an ET_EXEC file with fixed addresses, the address range
it consumed may or may not intersect with the arbitrary range we
will use for relocatable modules. Make sure we always use a free
- range for the offline allocations. */
- if (dwfl->offline_next_address >= mod->low_addr
+ range for the offline allocations. If this module did use
+ offline_next_address, it may have rounded it up for the module's
+ alignment requirements. */
+ if ((dwfl->offline_next_address >= mod->low_addr
+ || mod->low_addr - dwfl->offline_next_address < OFFLINE_REDZONE)
&& dwfl->offline_next_address < mod->high_addr + OFFLINE_REDZONE)
dwfl->offline_next_address = mod->high_addr + OFFLINE_REDZONE;