aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-03-23 21:15:08 +0000
committerIan Lance Taylor <ian@airs.com>2009-03-23 21:15:08 +0000
commitcb010894ee1a20c856455954d294401efd4d8e74 (patch)
tree24ed36033b62f2cfb000e848d95ed302834e0e1e /gold
parent9c482037a9b21d78ac1735960d55db860afbdd46 (diff)
downloadfsf-binutils-gdb-cb010894ee1a20c856455954d294401efd4d8e74.zip
fsf-binutils-gdb-cb010894ee1a20c856455954d294401efd4d8e74.tar.gz
fsf-binutils-gdb-cb010894ee1a20c856455954d294401efd4d8e74.tar.bz2
* merge.cc (do_add_input_section): Correct pend value. Change
message about last entry not being null terminated from error to warning.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/merge.cc8
2 files changed, 11 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 1297e19..1ccb0eb 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-23 Ian Lance Taylor <iant@google.com>
+
+ * merge.cc (do_add_input_section): Correct pend value. Change
+ message about last entry not being null terminated from error to
+ warning.
+
2009-03-20 Mikolaj Zalewski <mikolajz@google.com>
* incremental.cc: New file.
diff --git a/gold/merge.cc b/gold/merge.cc
index 1369938..25ecc40 100644
--- a/gold/merge.cc
+++ b/gold/merge.cc
@@ -465,7 +465,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
const unsigned char* pdata = object->section_contents(shndx, &len, false);
const Char_type* p = reinterpret_cast<const Char_type*>(pdata);
- const Char_type* pend = p + len;
+ const Char_type* pend = p + len / sizeof(Char_type);
if (len % sizeof(Char_type) != 0)
{
@@ -485,8 +485,10 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
{
if (pl >= pend)
{
- object->error(_("entry in mergeable string section "
- "not null terminated"));
+ gold_warning(_("%s: last entry in mergeable string section '%s' "
+ "not null terminated"),
+ object->name().c_str(),
+ object->section_name(shndx).c_str());
break;
}
}