diff options
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2012-11-08 12:50:08 +0100
committerEric B Munson <emunson@mgebm.net>2012-11-08 08:16:08 -0500
commit5c683bbc8578eb140852702494f63401380a3e00 (patch)
parentc612274431bb20298e7c13dc9bd7bb758c432ec9 (diff)
Fix WARNING: Unable to verify address range
This patch fixes a warning about an empty address range that will be issued when the offset in prepare_segment() is smaller than page_size. In that case, check_range_empty() would be called with len == 0 (the page_size down-aligned offset), triggering the warning. This is fixed by checking the down-aligned offset instead of the offset itself before calling check_range_empty(). Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Eric B Munson <emunson@mgebm.net>
1 files changed, 1 insertions, 1 deletions
diff --git a/elflink.c b/elflink.c
index e92d2dd..b746b26 100644
--- a/elflink.c
+++ b/elflink.c
@@ -872,7 +872,7 @@ static int prepare_segment(struct seg_info *seg)
end = (void *) ALIGN((unsigned long)seg->vaddr + seg->memsz, page_size);
new_end = (void *) ALIGN((unsigned long)end, hpage_size);
- if (offset)
+ if (ALIGN_DOWN(offset, page_size))
check_range_empty(start, ALIGN_DOWN(offset, page_size));
if (end != new_end)
check_range_empty(end, new_end - end);