Maintaining full frame information without -mapcs-frame on ARM

Austin Lund austin.lund@gmail.com
Sat Mar 28 02:04:00 GMT 2015


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?



More information about the Gcc-help mailing list