Skip to content

Commit

Permalink
* merge.cc (do_add_input_section): Correct pend value. Change
Browse files Browse the repository at this point in the history
	message about last entry not being null terminated from error to
	warning.
  • Loading branch information
ianlancetaylor committed Mar 23, 2009
1 parent 9c48203 commit cb01089
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions gold/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2009-03-23 Ian Lance Taylor <[email protected]>

* 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 <[email protected]>

* incremental.cc: New file.
Expand Down
8 changes: 5 additions & 3 deletions gold/merge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
}
}
Expand Down

0 comments on commit cb01089

Please sign in to comment.