PR 11072
authorIan Lance Taylor <ian@airs.com>
Fri, 8 Jan 2010 21:07:34 +0000 (21:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 8 Jan 2010 21:07:34 +0000 (21:07 +0000)
* layout.cc (Layout::include_section): Remove .gnu_debuglink
sections.

gold/ChangeLog
gold/layout.cc

index 64829720fdc4538e152dc695499b9cad3156cdde..214999bdaebf7388a06026a9cc8bb89736bb9502 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-08  Ian Lance Taylor  <iant@google.com>
+
+       PR 11072
+       * layout.cc (Layout::include_section): Remove .gnu_debuglink
+       sections.
+
 2010-01-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        * version.cc (print_version): Change to "Copyright 2010".
index a86590932ec74c88ce5ccacb450a91b083a2a957..dc339d6b5f9d4163dde205152b964315112f3dae 100644 (file)
@@ -352,6 +352,11 @@ Layout::include_section(Sized_relobj<size, big_endian>*, const char* name,
           if (is_prefix_of(".gnu.lto_", name))
             return false;
         }
+      // The GNU linker strips .gnu_debuglink sections, so we do too.
+      // This is a feature used to keep debugging information in
+      // separate files.
+      if (strcmp(name, ".gnu_debuglink") == 0)
+       return false;
       return true;
 
     default: