summaryrefslogtreecommitdiff
path: root/rld-rap.cpp
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-03-01 11:25:48 +1100
committerChris Johns <chrisj@rtems.org>2013-03-01 11:25:48 +1100
commit3b6f4dfeccdcbdf35082034992fe069c0a326a5e (patch)
treec587228a7717c7e51870c0bc66c2682874b3a369 /rld-rap.cpp
parentfd54b1cbabf8ad545ce535e21474b50483869837 (diff)
Fix errors building on CentOS.
Diffstat (limited to 'rld-rap.cpp')
-rw-r--r--rld-rap.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/rld-rap.cpp b/rld-rap.cpp
index 175376e..b198017 100644
--- a/rld-rap.cpp
+++ b/rld-rap.cpp
@@ -27,6 +27,8 @@
#include "config.h"
#endif
+#include <string.h>
+
#include <algorithm>
#include <list>
#include <iomanip>
@@ -821,7 +823,7 @@ namespace rld
object::get_relocations (int sec) const
{
if ((sec < 0) || (sec >= rap_secs))
- throw rld::error ("Invalid section index '" + rld::to_string (index),
+ throw rld::error ("Invalid section index '" + rld::to_string (sec),
"rap::relocations");
return secs[sec].relocs.size ();
}
@@ -1354,7 +1356,7 @@ namespace rld
image::get_relocations (int sec) const
{
if ((sec < 0) || (sec >= rap_secs))
- throw rld::error ("Invalid section index '" + rld::to_string (index),
+ throw rld::error ("Invalid section index '" + rld::to_string (sec),
"rap::image::relocations");
uint32_t relocs = 0;
@@ -1407,7 +1409,7 @@ namespace rld
image::section_size (sections sec) const
{
if ((sec < 0) || (sec >= rap_secs))
- throw rld::error ("Invalid section index '" + rld::to_string (index),
+ throw rld::error ("Invalid section index '" + rld::to_string (sec),
"rap::image::section_size");
return sec_size[sec];
}