提交 ec822001 编写于 作者: L Laurent Desnogues 提交者: Anthony Liguori

Fix symfind.

this patch fixes an issue in symfind.

Assume you have the following symbols:

Address  Size
0045bca0 00000080 T s0
0045bd20 00000112 T s1

You'll notice that s1 is s0 + size.

So the current symfind will find that address 0045bd20 belongs to s0
instead of s1.

Laurent
Signed-off-by: NLaurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Message-Id: 
上级 ac8ab73a
......@@ -67,7 +67,7 @@ static int glue(symfind, SZ)(const void *s0, const void *s1)
int result = 0;
if (key->st_value < sym->st_value) {
result = -1;
} else if (key->st_value > sym->st_value + sym->st_size) {
} else if (key->st_value >= sym->st_value + sym->st_size) {
result = 1;
}
return result;
......
......@@ -1199,7 +1199,7 @@ static int symfind(const void *s0, const void *s1)
int result = 0;
if (key->st_value < sym->st_value) {
result = -1;
} else if (key->st_value > sym->st_value + sym->st_size) {
} else if (key->st_value >= sym->st_value + sym->st_size) {
result = 1;
}
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册