      goto badreg;
  #elif defined(UNW_TARGET_SH)
 diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
-index 765f7d5..c12a05c 100644
+index 765f7d5..ced4896 100644
 --- a/src/ptrace/_UPT_reg_offset.c
 +++ b/src/ptrace/_UPT_reg_offset.c
-@@ -501,6 +501,41 @@ const int _UPT_reg_offset[UNW_REG_LAST + 1] =
+@@ -1,6 +1,7 @@
+ /* libunwind - a platform-independent unwind library
+    Copyright (C) 2003-2004 Hewlett-Packard Co
+ 	Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++   Copyright (C) 2013 Linaro Limited
+ 
+ This file is part of libunwind.
+ 
+@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST + 1] =
      [UNW_ARM_R15]      = 0x3c,
  #elif defined(UNW_TARGET_MIPS)
  #elif defined(UNW_TARGET_SH)

+	aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c 	    \
+	aarch64/Lstep.c
+
+libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common)	    \
+	$(libunwind_la_SOURCES_generic)					    \
+	aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c 		    \
+	aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c 	    \
+	aarch64/Ginit_local.c aarch64/Ginit_remote.c	    		    \
+	aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c aarch64/Gstep.c
+
 # The list of files that go into libunwind and libunwind-arm:
 noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
 libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common)	    \
@@ -428,6 +449,18 @@ if OS_FREEBSD
  libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
 endif
 

+
+    UNW_TDEP_IP = UNW_AARCH64_X30,
+    UNW_TDEP_SP = UNW_AARCH64_SP,
+    UNW_TDEP_EH = UNW_AARCH64_X0,
+
+  }
+aarch64_regnum_t;
