1 --- binutils-2.17.50.0.3/bfd/opncls.c.orig 2006-07-15 20:23:49.000000000 +0200
2 +++ binutils-2.17.50.0.3/bfd/opncls.c 2006-09-02 15:14:01.443277250 +0200
7 + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */
8 + if (separate_debug_file_exists (basename, crc32))
11 dir = strdup (abfd->filename);
18 - /* Strip off any path components in filename. */
19 - filename = lbasename (filename);
21 sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
24 @@ -1439,9 +1440,10 @@
25 crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
28 - /* Strip off any path components in filename,
29 - now that we no longer need them. */
30 - filename = lbasename (filename);
31 + /* PLD: for files installed in rpm's build root strip the install prefix */
32 + char const* relaxed_filename = strstr( filename, "/usr/lib/debug/" );
33 + if ( relaxed_filename != NULL )
34 + filename = relaxed_filename;
36 debuglink_size = strlen (filename) + 1;