1 --- binutils-2.15.94.0.2.2/bfd/opncls.c~ 2008-10-14 21:22:06.000000000 +0300
2 +++ binutils-2.15.94.0.2.2/bfd/opncls.c 2008-10-14 21:24:48.052157688 +0300
5 BFD_ASSERT (strlen (dir) != 0);
7 + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */
8 + if (separate_debug_file_exists (basename, crc32))
11 /* Strip off filename part. */
12 for (i = strlen (dir) - 1; i >= 0; i--)
13 if (IS_DIR_SEPARATOR (dir[i]))
14 @@ -1345,6 +1349,15 @@
15 return find_separate_debug_file (abfd, dir);
19 +relaxed_filename (char const* filename)
21 + char const* relaxed = strstr (filename, "/usr/lib/debug/");
22 + if ( relaxed != NULL )
29 bfd_create_gnu_debuglink_section
34 - /* Strip off any path components in filename. */
35 - filename = lbasename (filename);
36 + filename = relaxed_filename (filename);
38 sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
41 crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
44 - /* Strip off any path components in filename,
45 - now that we no longer need them. */
46 - filename = lbasename (filename);
47 + filename = relaxed_filename (filename);
49 filelen = strlen (filename);
50 debuglink_size = filelen + 1;