Re: Finding virtual address of functions in code

2018-07-01 Thread Eric Botcazou
> Is there any builtin function in C which prints the virtual address of > functions including the main? I see __builtin_return_address() but that > returns the “return address”. This list is not appropriate for such a question, use gcc-help@ instead. -- Eric Botcazou

Re: Finding virtual address of functions in code

2018-07-01 Thread Andrew Haley
On 07/01/2018 03:19 PM, Mahmood Naderan via gcc wrote: > Is there any builtin function in C which prints the virtual address > of functions including the main? I see __builtin_return_address() > but that returns the “return address”. #include int main() { printf("%p\n", main); } -- Andrew

Finding virtual address of functions in code

2018-07-01 Thread Mahmood Naderan via gcc
Hi, Is there any builtin function in C which prints the virtual address of functions including the main? I see __builtin_return_address() but that returns the “return address”. Regards, Mahmood