This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Maintaining full frame information without -mapcs-frame on ARM
- From: Austin Lund <austin dot lund at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 28 Mar 2015 12:04:04 +1000
- Subject: Maintaining full frame information without -mapcs-frame on ARM
- Authentication-results: sourceware.org; auth=none
It seems that -mapcs-frame is going away:
https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01001.html
However, I cannot find any combination of options without -mapcs-frame
or -mapcs which will at least maintain the full four registers (pc,
lr, sp, fp) in the stack frame.
The reason I'm wanting that is that at least for perf in linux, they
way the kernel performs a userspace backtrace is to look up the saved
lr register in each frame (see for example in linux
arch/arm/kernel/perf_callchain.c). But without -mapcs-frame there is
no guarantee that anything will be saved.
What is the right switch to use in the future to ensure that the four
registers are in each frame?