When compiling with the arm-linux compiler with optimization enabled, the compiler removes frame pointers from functions even when they are profiled. This leads to a segmentation fault with the glibc version of mcount when it attempts to determine the caller of a function from the current stack because mcount assumes the frame pointer is there.
It seems that optimized functions, on this platform, should not drop their frame pointers when profiling is enabled. -- Summary: Profiling optimized code causes segfaults on ARM due to missing frames Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: opensource at artnaseef dot com CC: gcc-bugs at gcc dot gnu dot org,opensource at artnaseef dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: arm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18929