summaryrefslogtreecommitdiffstats
path: root/scripts/gcc-version.sh
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2009-03-04 11:48:46 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-05 13:47:15 +0000
commitd4cc510c61b050ef38e842a12feef71c56d7cf81 (patch)
tree12b3bcee76dd5252c9c6efe3ffc83d34a75b77ca /scripts/gcc-version.sh
parent843e22b056c07d39b8f97935173dab879abc613b (diff)
downloadkernel-crypto-d4cc510c61b050ef38e842a12feef71c56d7cf81.tar.gz
kernel-crypto-d4cc510c61b050ef38e842a12feef71c56d7cf81.tar.xz
kernel-crypto-d4cc510c61b050ef38e842a12feef71c56d7cf81.zip
[ARM] 5418/1: restore lr before leaving mcount
gcc seems to expect that lr isn't clobbered by mcount, because for a function starting with: static int func(void) { void *ra = __builtin_return_address(0); printk(KERN_EMERG "__builtin_return_address(0) = %pS\n", ra) ... the following assembler is generated by gcc 4.3.2: 0: e1a0c00d mov ip, sp 4: e92dd810 push {r4, fp, ip, lr, pc} 8: e24cb004 sub fp, ip, #4 ; 0x4 c: ebfffffe bl 0 <mcount> 10: e59f0034 ldr r0, [pc, #52] 14: e1a0100e mov r1, lr 18: ebfffffe bl 0 <printk> Without this patch obviously __builtin_return_address(0) yields func+0x10 instead of the return address of the caller. Note this patch fixes a similar issue for the routines used with dynamic ftrace even though this isn't currently selectable for ARM. Cc: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'scripts/gcc-version.sh')
0 files changed, 0 insertions, 0 deletions