--- 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;