]>
Commit | Line | Data |
---|---|---|
3bf1bb9e JB |
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 | |
3 | @@ -1209,6 +1209,15 @@ | |
4 | return name; | |
0d11749f PS |
5 | } |
6 | ||
7 | +static char const* | |
8 | +relaxed_filename (char const* filename) | |
9 | +{ | |
10 | + char const* relaxed = strstr (filename, "/usr/lib/debug/"); | |
11 | + if ( relaxed != NULL ) | |
12 | + return relaxed; | |
13 | + return filename; | |
14 | +} | |
15 | + | |
16 | /* | |
17 | FUNCTION | |
3bf1bb9e JB |
18 | bfd_get_alt_debug_link_info |
19 | @@ -1397,6 +1406,10 @@ | |
20 | ||
21 | if (include_dirs) | |
22 | { | |
23 | + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */ | |
968b415b | 24 | + if (separate_debug_file_exists (basename, func_data)) |
3bf1bb9e JB |
25 | + return basename; |
26 | + | |
27 | for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--) | |
28 | if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1])) | |
29 | break; | |
30 | @@ -1629,8 +1642,7 @@ | |
50f0e64b PS |
31 | return NULL; |
32 | } | |
33 | ||
34 | - /* Strip off any path components in filename. */ | |
35 | - filename = lbasename (filename); | |
0d11749f PS |
36 | + filename = relaxed_filename (filename); |
37 | ||
50f0e64b PS |
38 | sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK); |
39 | if (sect) | |
3bf1bb9e | 40 | @@ -1716,9 +1728,7 @@ |
50f0e64b PS |
41 | crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count); |
42 | fclose (handle); | |
43 | ||
44 | - /* Strip off any path components in filename, | |
45 | - now that we no longer need them. */ | |
46 | - filename = lbasename (filename); | |
0d11749f | 47 | + filename = relaxed_filename (filename); |
369db808 | 48 | |
5ddbe45d JB |
49 | filelen = strlen (filename); |
50 | debuglink_size = filelen + 1; |