diff options
author | Laurent Desnogues <laurent.desnogues@gmail.com> | 2009-07-30 19:23:49 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-10 13:05:25 -0500 |
commit | ec822001a2f26eef8701194714f6482b6d852de2 (patch) | |
tree | 0b49dc5d140d04ff469c5304a6cd38e8a0f6519a /linux-user/elfload.c | |
parent | ac8ab73ad145b8ac15520446f8b98d28957b6acf (diff) | |
download | hqemu-ec822001a2f26eef8701194714f6482b6d852de2.zip hqemu-ec822001a2f26eef8701194714f6482b6d852de2.tar.gz |
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: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r-- | linux-user/elfload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index a38167d..4f04b98 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -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; |