Skip to content

Commit 97bccbe

Browse files
committed
Debug 32 build.
1 parent 048cbbb commit 97bccbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cTools/libs/binDynMod/elfDynMod/elf32DynMod.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ void *elf32Hook(const Elf32File *elf32, const char *func, const void *hand)
3939
* symbolIndex - index of target symbol in .dynsym section.
4040
*/
4141
uint32_t symbolIndex = elf32GetDSymIndxByName(elf32, func);
42+
STDERROR_PRINT("func: %s, idex: %u", func, symbolIndex);
4243
if (symbolIndex == (uint32_t)-1) {
4344
LOG_ERROR("Cannot get an index of a dynamic symbol %s.", func);
4445
return NULL;
@@ -74,6 +75,7 @@ void *elf32Hook(const Elf32File *elf32, const char *func, const void *hand)
7475
uint32_t i = 0;
7576
for (i = 0; i < relpltAmount; ++i)
7677
if (ELF32_R_SYM(elf32->relplt[i].r_info) == symbolIndex){
78+
STDERROR_PRINT("gotcha %u", i);
7779
uint32_t offset = elf32->relplt[i].r_offset;
7880
uint32_t* addr = (uint32_t*)(size_t)(func_addr_diff + offset);
7981
relAddr = (void*)(size_t) *addr;

0 commit comments

Comments
 (0)