On 14 December 2010 08:12, ali hagigat wrote: > When using standard library functions, we use some include files which > will add some extern function prototypes. But does gcc add the object > files of those functions automatically to linker? Yes, the standard C library is linked to by default. > For a regular C program in free-standing mode we have to mention the > names of the all the libraries we want to link, but how gcc can add > those standard libraries(corresponding to the functions used) without > forcing us to specify them for linker? Because they're standard, so they're always linked to. Use -nostdlib to override that behaviour.