Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c	(revision 201292)
+++ gcc/config/aarch64/aarch64.c	(working copy)
@@ -4151,18 +4151,25 @@
 }
 
 
-/* Implement RETURN_ADDR_RTX.  We do not support moving back to a
-   previous frame.  */
-
+/* Implement RETURN_ADDR_RTX.  As per AArch64 ABI, the return address
+   is stored at an offset 8 bytes from the frame pointer of a function.  */
 rtx
-aarch64_return_addr (int count, rtx frame ATTRIBUTE_UNUSED)
+aarch64_return_addr (int count, rtx frame)
 {
   if (count != 0)
-    return const0_rtx;
-  return get_hard_reg_initial_val (Pmode, LR_REGNUM);
+    {
+	rtx mem_lr;
+
+	mem_lr = gen_frame_mem (DImode,
+			        plus_constant (Pmode,
+					       frame,
+				 	       UNITS_PER_WORD));
+	return mem_lr;
+    }
+  else
+    return get_hard_reg_initial_val (Pmode, LR_REGNUM);
 }
 
-
 static void
 aarch64_asm_trampoline_template (FILE *f)
 {
