aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-19 19:39:32 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-19 19:39:32 +0000
commit4110593748137da1416f0822b3771fddcd4f8970 (patch)
treea5c58d3d9ab3e666a592552560a7a1b5559a6be1 /gold
parent604399204f1a6e09056023af6d315dc25e8c6963 (diff)
downloadfsf-binutils-gdb-4110593748137da1416f0822b3771fddcd4f8970.zip
fsf-binutils-gdb-4110593748137da1416f0822b3771fddcd4f8970.tar.gz
fsf-binutils-gdb-4110593748137da1416f0822b3771fddcd4f8970.tar.bz2
2009-03-19 Paul Pluzhnikov <ppluzhnikov@google.com>
* layout.cc (Layout::output_section_name): Preserve names of '.note.' sections.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/layout.cc5
2 files changed, 10 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 96abf8a..a736dcb 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
diff --git a/gold/layout.cc b/gold/layout.cc
index b59caea..108111a 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -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)