Re: Not able to see all the symbols in the output of "nm" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is possible that non-inline function will be translated to inline
function by compiler. when using back trace, I have suffered the
problems that the function calling sequence is impossible, because one
of the function is missed. Then I objdumped the elf file and found
that the missing function is inlined by compiler; However, you can use
2 method, I knowed, to avoid being inlined by compiler:

1. Putting __attribute__((optimized("O0"))) before the function definition.

2. Using the following gcc extension usage to avoid optimization.
#pragma GCC push_options
#pragma GCC optimized("O0")
your code block...
#pragma GCC pop_options

Gavin Guo

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux