mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Fixed test in section finding code that was broken for .plt and .got sections.
Thanks to Tom Hughes for the patch. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2075
This commit is contained in:
parent
18564d3066
commit
5f1bf8818f
@ -982,17 +982,14 @@ Bool vg_read_lib_symbols ( SegInfo* si )
|
||||
if (0 == VG_(strcmp)(sec_name, sh_strtab + shdr[i].sh_name)) { \
|
||||
if (0 != sec_data) \
|
||||
VG_(core_panic)("repeated section!\n"); \
|
||||
if (in_exec) { \
|
||||
if (in_exec) \
|
||||
sec_data = (type)(si->offset + shdr[i].sh_addr); \
|
||||
sec_size = shdr[i].sh_size; \
|
||||
} else { \
|
||||
else \
|
||||
sec_data = (type)(oimage + shdr[i].sh_offset); \
|
||||
sec_size = shdr[i].sh_size; \
|
||||
} \
|
||||
sec_size = shdr[i].sh_size; \
|
||||
TRACE_SYMTAB( "%18s: %p .. %p\n", \
|
||||
sec_name, sec_data, sec_data + sec_size - 1); \
|
||||
if ( sec_size + (UChar*)sec_data > n_oimage + (UChar*)oimage) \
|
||||
{ \
|
||||
if ( shdr[i].sh_offset + sec_size > n_oimage ) { \
|
||||
VG_(symerr)(" section beyond image end?!"); \
|
||||
goto out; \
|
||||
} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user