]>
Commit | Line | Data |
---|---|---|
da39e285 | 1 | --- binutils-2.17.50.0.3/bfd/opncls.c.orig 2006-07-15 20:23:49.000000000 +0200 |
d78da495 | 2 | +++ binutils-2.17.50.0.3/bfd/opncls.c 2006-09-02 19:50:45.155718000 +0200 |
da39e285 PS |
3 | @@ -1215,6 +1215,10 @@ |
4 | return NULL; | |
5 | } | |
6 | ||
92c64343 | 7 | + /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */ |
da39e285 PS |
8 | + if (separate_debug_file_exists (basename, crc32)) |
9 | + return basename; | |
10 | + | |
11 | dir = strdup (abfd->filename); | |
12 | if (dir == NULL) | |
13 | { | |
d78da495 PS |
14 | @@ -1322,6 +1326,15 @@ |
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 | |
30 | @@ -1353,8 +1366,7 @@ | |
da39e285 PS |
31 | return NULL; |
32 | } | |
33 | ||
34 | - /* Strip off any path components in filename. */ | |
35 | - filename = lbasename (filename); | |
d78da495 PS |
36 | + filename = relaxed_filename (filename); |
37 | ||
da39e285 PS |
38 | sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK); |
39 | if (sect) | |
d78da495 | 40 | @@ -1439,9 +1451,7 @@ |
da39e285 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); | |
d78da495 | 47 | + filename = relaxed_filename (filename); |
92c64343 | 48 | |
da39e285 PS |
49 | debuglink_size = strlen (filename) + 1; |
50 | debuglink_size += 3; |