]>
Commit | Line | Data |
---|---|---|
ea4123b4 ER |
1 | --- binutils-2.18.50.0.2/bfd/opncls.c.orig 2007-10-03 17:52:57.000000000 +0200 |
2 | +++ binutils-2.18.50.0.2/bfd/opncls.c 2007-10-22 22:30:03.233754376 +0200 | |
3 | @@ -1241,6 +1241,10 @@ | |
4 | return NULL; | |
50f0e64b PS |
5 | } |
6 | ||
369db808 | 7 | + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */ |
50f0e64b PS |
8 | + if (separate_debug_file_exists (basename, crc32)) |
9 | + return basename; | |
10 | + | |
ea4123b4 ER |
11 | for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--) |
12 | if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1])) | |
13 | break; | |
5ddbe45d | 14 | @@ -1345,6 +1349,15 @@ |
0d11749f PS |
15 | return find_separate_debug_file (abfd, dir); |
16 | } | |
17 | ||
18 | +static char const* | |
19 | +relaxed_filename (char const* filename) | |
20 | +{ | |
21 | + char const* relaxed = strstr (filename, "/usr/lib/debug/"); | |
22 | + if ( relaxed != NULL ) | |
23 | + return relaxed; | |
24 | + return filename; | |
25 | +} | |
26 | + | |
27 | /* | |
28 | FUNCTION | |
29 | bfd_create_gnu_debuglink_section | |
5ddbe45d | 30 | @@ -1376,8 +1389,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) | |
5ddbe45d | 40 | @@ -1463,9 +1475,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; |