So right now I'm trying to resolve function calls and their names in my reversing tool
the problem I'm having is that library functions such as printf and fwrite and such do not have a corresponding address in symbol table unlike functions inside the actual program which do contain a virtual address in the symbol table and therefore i can resolve their name when they are called statically
basically i want to resolve the name of functions even static library functions like printf just like how readelf does (i tried readelf and indeed it does resolve the name of printf even tho it says the address value of printf inside symbol table is 0 unlike other functions so not sure how does it realize the offset of printf inside plt)
so i have these questions :
how to find the index or address of printf in the PLT so i can resolve its name when i see a "Call address"
why doesn't the symbol table contain the virtual address of these functions unlike functions inside the code? considering these are static libraries and are statically linked in that program, shouldn't they have a fixed address just like other functions?
the program is only a printf function inside main and only included stdio.h, now my understanding is that i included the stdio.h statically considering i included it in the beginning and didnt use any specific option while compiling. so why is it going into PLT instead of .text section and having a static address? i thought when i include a library in the beginning it basically copy and pastes it into my .text section?