2009-03-19 Paul Pluzhnikov <ppluzhnikov@google.com>
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Thu, 19 Mar 2009 19:39:32 +0000 (19:39 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Thu, 19 Mar 2009 19:39:32 +0000 (19:39 +0000)
* layout.cc (Layout::output_section_name): Preserve names
of '.note.' sections.

gold/ChangeLog
gold/layout.cc

index 96abf8ac1322b544bcdca542e93e566efaccce4c..a736dcbb680529b8ca6cce46e9121da33e78db5e 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-19  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       * layout.cc (Layout::output_section_name): Preserve names
+       of '.note.' sections.
+       
 2009-03-19  Ian Lance Taylor  <iant@google.com>
 
        * descriptors.cc (Descriptors::open): Check that the options are
index b59caea6166d48e91709741e2adb88abf5de27bc..108111a260e0e5710325105918fc3b0b8702fb70 100644 (file)
@@ -2899,6 +2899,9 @@ Layout::output_section_name(const char* name, size_t* plen)
   // initial '.', we use the name unchanged (i.e., "mysection" and
   // ".text" are unchanged).
 
+  // If the name starts with '.note', we keep it unchanged (e.g. to
+  // avoid truncating '.note.ABI-tag' to '.note').
+
   // If the name starts with ".data.rel.ro.local" we use
   // ".data.rel.ro.local".
 
@@ -2914,6 +2917,8 @@ Layout::output_section_name(const char* name, size_t* plen)
   const char* sdot = strchr(s, '.');
   if (sdot == NULL)
     return name;
+  if (strncmp(name, ".note.", 6) == 0)
+    return name;
 
   const char* const data_rel_ro_local = ".data.rel.ro.local";
   if (strncmp(name, data_rel_ro_local, strlen(data_rel_ro_local)) == 0)
This page took 0.034037 seconds and 4 git commands to generate.