summaryrefslogtreecommitdiff
path: root/rld-rap.cpp
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-27 11:19:15 +1100
committerChris Johns <chrisj@rtems.org>2012-11-27 11:19:15 +1100
commit685475d63da95fc423125afafa2f24f4fc2e0822 (patch)
tree4a702104050313ce71520f3f0e372ee17a0e1834 /rld-rap.cpp
parentd060f462292e35df0851d9ae5883f29a662a010d (diff)
Add machine related data to allow better checking.
Diffstat (limited to 'rld-rap.cpp')
-rw-r--r--rld-rap.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/rld-rap.cpp b/rld-rap.cpp
index df2a658..017e8d7 100644
--- a/rld-rap.cpp
+++ b/rld-rap.cpp
@@ -386,15 +386,19 @@ namespace rld
image::write (compress::compressor& comp, const std::string& metadata)
{
/*
- * Start with the number of object files to load and the memory foot in
- * the target so it can be allocated first then add the metadata size and
- * then the metadata.
+ * Start with the machine type so the target can check the applicatiion
+ * is ok and can be loaded. for the number of object files to load and the memory
+ * foot in the target so it can be allocated first then add the metadata
+ * size and then the metadata.
*/
- comp << objs.size ()
+ comp << elf::object_machine_type ()
+ << elf::object_datatype ()
+ << elf::object_class ()
+ << (uint32_t) objs.size ()
<< text_size
<< data_size
<< bss_size
- << metadata.size ()
+ << (uint32_t) metadata.size ()
<< metadata;
/*