Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libsa update marks[MARK_DATA] with COUNT_DATA.
details: https://anonhg.NetBSD.org/src/rev/6a78a868188e
branches: trunk
changeset: 351713:6a78a868188e
user: nonaka <nonaka%NetBSD.org@localhost>
date: Thu Feb 23 12:13:59 2017 +0000
description:
update marks[MARK_DATA] with COUNT_DATA.
diffstat:
sys/lib/libsa/loadfile_elf32.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 2ba01288595f -r 6a78a868188e sys/lib/libsa/loadfile_elf32.c
--- a/sys/lib/libsa/loadfile_elf32.c Thu Feb 23 12:13:05 2017 +0000
+++ b/sys/lib/libsa/loadfile_elf32.c Thu Feb 23 12:13:59 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_elf32.c,v 1.35 2017/02/23 12:13:05 nonaka Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.36 2017/02/23 12:13:59 nonaka Exp $ */
/*
* Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -363,6 +363,10 @@
}
if ((IS_TEXT(phdr[i]) && (flags & (LOAD_TEXT|COUNT_TEXT))) ||
(IS_DATA(phdr[i]) && (flags & (LOAD_DATA|COUNT_DATA)))) {
+ /* XXX: Assume first address is lowest */
+ if (marks[MARK_DATA] == 0 && IS_DATA(phdr[i]))
+ marks[MARK_DATA] = LOADADDR(phdr[i].p_vaddr);
+
pos = phdr[i].p_vaddr;
if (minp > pos)
minp = pos;
Home |
Main Index |
Thread Index |
Old Index