]> git.pld-linux.org Git - packages/binutils.git/blobdiff - binutils-absolute-gnu_debuglink-path.patch
- added tooldir patch, specify tooldir at configure time instead of passing to make
[packages/binutils.git] / binutils-absolute-gnu_debuglink-path.patch
index fae9499a032c2c7395fc98b66ae47614088cc138..f4d314473193be71aa90ffc0e82b1068c5da4cde 100644 (file)
@@ -1,34 +1,50 @@
---- binutils-2.17.50.0.3/bfd/opncls.c.orig     2006-07-15 20:23:49.000000000 +0200
-+++ binutils-2.17.50.0.3/bfd/opncls.c  2006-09-02 10:21:33.212591250 +0200
-@@ -1215,6 +1215,10 @@
+--- binutils-2.18.50.0.2/bfd/opncls.c.orig     2007-10-03 17:52:57.000000000 +0200
++++ binutils-2.18.50.0.2/bfd/opncls.c  2007-10-22 22:30:03.233754376 +0200
+@@ -1241,6 +1241,10 @@
        return NULL;
      }
  
-+  /* PLD: check the possible absolute debuginfo path (e.g. /usr/lib/debug/... */
++  /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */
 +  if (separate_debug_file_exists (basename, crc32))
 +    return basename;
 +
-   dir = strdup (abfd->filename);
-   if (dir == NULL)
-     {
-@@ -1353,9 +1357,6 @@
+   for (dirlen = strlen (abfd->filename); dirlen > 0; dirlen--)
+     if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1]))
+       break;
+@@ -1345,6 +1349,15 @@
+   return find_separate_debug_file (abfd, dir);
+ }
++static char const*
++relaxed_filename (char const* filename)
++{
++  char const* relaxed = strstr (filename, "/usr/lib/debug/");
++  if ( relaxed != NULL )
++    return relaxed;
++  return filename;
++}
++
+ /*
+ FUNCTION
+       bfd_create_gnu_debuglink_section
+@@ -1376,8 +1389,7 @@
        return NULL;
      }
  
 -  /* Strip off any path components in filename.  */
 -  filename = lbasename (filename);
--
++  filename = relaxed_filename (filename);
    sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
    if (sect)
-     {
-@@ -1439,10 +1440,6 @@
+@@ -1463,9 +1475,7 @@
      crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
    fclose (handle);
  
 -  /* Strip off any path components in filename,
 -     now that we no longer need them.  */
 -  filename = lbasename (filename);
--
-   debuglink_size = strlen (filename) + 1;
-   debuglink_size += 3;
-   debuglink_size &= ~3;
++  filename = relaxed_filename (filename);
+   filelen = strlen (filename);
+   debuglink_size = filelen + 1;
This page took 0.106067 seconds and 4 git commands to generate.