Will the functions and variables precede with an “_” when compiled using gcc?
问题 I am learning OS development in a Linux environment using GCC. I learnt in Bran's Kernel Development that all the functions and variable names in C when compiled precedes with an "_"(underscore) in its corresponding Assembly source file. But when I went through the assembly source of a compiled C program, I can't even find the "_main" function. I performed the following. cpp sample.c sample.i gcc -S sample.I 回答1: That was true in the early days. A given C function foo would show up as _foo in