I am not sure if this is the write place to post questions, if not please suggest me an appropriate forum from where i can get help...
I have an ELF binary and I make some changes in this binary where I replace a call to a function by a call to some address which contains my code, and which does nothing but calls the original function.
The objdump diff is pasted below.
856: 55 push %ebp
857: 56 push %esi
858: 31 ed xor %ebp,%ebp
- 85a: e8 51 d4 00 00 call dcb0 <_dl_init>
+ 85a: e8 61 eb 00 00 call f3c0
85f: 8d 93 3c 10 ff ff lea -0xefc4(%ebx),%edx
865: 8b 24 24 mov (%esp),%esp
868: ff e7 jmp *%edi
@@ -17755,11 +17755,8 @@
f3bf: 90 nop
- f3c0: 55 push %ebp
- f3c1: 89 e5 mov %esp,%ebp
- f3c3: 90 nop
- f3c4: 90 nop
- f3c5: 90 nop
+ f3c0: e8 51 d4 00 00 call 1c816
+ f3c5: c3 ret
f3c6: 90 nop
f3c7: 90 nop
Aren't the two calls identical ? Why does the disassembler not resolve the function name for the call in "my_func" to _dl_init ?