How to know the memory location for C functions?

來源: 2011-09-18 20:08:35 [舊帖] [給我悄悄話] 本文已被閱讀:

Suppose I have the following C program under Linux. When I run the program, how should I know where the function main() and Foo() are loaded in the physical memory?

int main()
{
    Foo();
    exit(0);
}

Foo()
{
    printf(“hello world\n”);
}