Hi guys,
I normally include the header of stdio.h to get some functions like printf() and so on. Ok, well so what's going on in the process of producing my outputfile, let's say a.out?
I learned that the cpp comes first and cleans up the things with # (#include, #define,...), then there comes the gcc and it creates an assembler format with is then transformed into an object code like *.o. After that the linker/loader cleans up all problems like linking and referencing stuff.
So that's what I know...not much but a bit .
Anyways I was wondering where the function let's say printf() is hiding? Is there any stdio.c or is the all done with dynamic libraries and shared objects? And well if that's the case in with *.so is the function printf()??
Oh, yeah I know how to check for dynamic linked libraries in a file (with ldd) and this gives my (I just included sdtio.h) the files
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7da8000)
/lib/ld-linux.so.2 (0xb7f03000)
Mhm, maybe there's someone out there who did actually understand my question and might help.
BTW: The problem came up because for math.h you always have to tell gcc with the -l obtions to get those functions. Why is this necessary for math.h but not for stdio.h??
Thanks
TurboToJo