]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - debian/patches/305_arm-dis.dpatch
Import 2.18.1~cvs20080103-0tinyos1 from old svn repo.
[msp430-binutils.git] / debian / patches / 305_arm-dis.dpatch
diff --git a/debian/patches/305_arm-dis.dpatch b/debian/patches/305_arm-dis.dpatch
new file mode 100755 (executable)
index 0000000..c7ac296
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+## 305_arm-dis.dpatch
+##
+## DP: Description: Fix segfault when disassembling ARM code
+## DP: Upstream status: Fix in CVS head
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -u -r1.86 -r1.87
+--- src/opcodes/arm-dis.c      2007/07/05 09:49:00     1.86
++++ src/opcodes/arm-dis.c      2007/10/26 11:27:12     1.87
+@@ -3989,6 +3989,7 @@
+   /* First check the full symtab for a mapping symbol, even if there
+      are no usable non-mapping symbols for this address.  */
+   if (info->symtab != NULL
++      && * info->symtab
+       && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
+     {
+       bfd_vma addr;