summaryrefslogtreecommitdiffstats
path: root/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch')
-rw-r--r--source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch b/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
new file mode 100644
index 000000000..944f4fdd3
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
@@ -0,0 +1,38 @@
+--- a/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000
++++ b/bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000
+@@ -1297,6 +1297,8 @@
+ bfd_malloc (strlen (debug_file_directory) + 1
+ + (canon_dirlen > dirlen ? canon_dirlen : dirlen)
+ + strlen (".debug/")
++#define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/"
++ + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/")
+ + strlen (base)
+ + 1);
+ if (debugfile == NULL)
+@@ -1332,6 +1334,26 @@
+ if (check_func (debugfile, crc32))
+ goto found;
+
++ /* Then try in the global debug dir for Fedora libraries. */
++ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
++ if (separate_debug_file_exists (debugfile, crc32))
++ {
++ free (base);
++ free (dir);
++ free (canon_dir);
++ return debugfile;
++ }
++
++ /* Then try in the usr subdirectory of the global debug dir for Fedora libraries. */
++ sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
++ if (separate_debug_file_exists (debugfile, crc32))
++ {
++ free (base);
++ free (dir);
++ free (canon_dir);
++ return debugfile;
++ }
++
+ /* Then try in the global debugfile directory. */
+ strcpy (debugfile, debug_file_directory);
+ dirlen = strlen (debug_file_directory) - 1;