1 --- binutils-2.28/bfd/opncls.c.orig 2017-03-02 09:23:53.000000000 +0100
2 +++ binutils-2.28/bfd/opncls.c 2017-06-06 05:31:14.585633912 +0200
8 +relaxed_filename (char const* filename)
10 + char const* relaxed = strstr (filename, "/usr/lib/debug/");
11 + if ( relaxed != NULL )
18 bfd_get_alt_debug_link_info
19 @@ -1397,6 +1406,10 @@
23 + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */
24 + if (separate_debug_file_exists (basename, func_data))
27 for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--)
28 if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1]))
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;