summaryrefslogtreecommitdiff
path: root/rtl.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-29 19:08:57 +1100
committerChris Johns <chrisj@rtems.org>2012-11-29 19:08:57 +1100
commitfc313fda72db4b7aa774e191244bf83427b0fec1 (patch)
tree159e98d0ffaa489a4f4b3deb7ca49178df8bfa2a /rtl.h
parent62b19fe866226b8fa0ce54351162dab367daa06a (diff)
RAP file support.
This is the initial addition of support for LZ77 RTEMS applications in the RAP format. The change add support for different formats to the loader. Each format type is asked to check the file being loading and if it matches the format's loader is called to load the file. Support has been added to stream LZ77 files via the object file cache.
Diffstat (limited to 'rtl.h')
-rw-r--r--rtl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/rtl.h b/rtl.h
index c02b4dd..52149d5 100644
--- a/rtl.h
+++ b/rtl.h
@@ -26,6 +26,7 @@
#include <rtl-fwd.h>
#include <rtl-obj.h>
#include <rtl-obj-cache.h>
+#include <rtl-obj-comp.h>
#include <rtl-unresolved.h>
#ifdef __cplusplus
@@ -93,6 +94,7 @@ struct rtems_rtl_data_s
rtems_rtl_obj_cache_t symbols; /**< Symbols object file cache. */
rtems_rtl_obj_cache_t strings; /**< Strings object file cache. */
rtems_rtl_obj_cache_t relocs; /**< Relocations object file cache. */
+ rtems_rtl_obj_comp_t decomp; /**< The decompression compressor. */
int last_errno; /**< Last error number. */
char last_error[64]; /**< Last error string. */
};
@@ -144,6 +146,21 @@ void rtems_rtl_obj_caches (rtems_rtl_obj_cache_t** symbols,
void rtems_rtl_obj_caches_flush (void);
/**
+ * Get the RTL decompressor setting the cache and the offset in the file the
+ * compressed stream starts. This call assmes the RTL is locked.
+ *
+ * @param decomp Pointer to the location to set the compressor into. Returns
+ * NULL is rtl is not initialised.
+ * @param cache The cache to read the file with. Saves needing an extrs buffer.
+ * @param offset The offset in the file the compressed stream starts.
+ */
+void rtems_rtl_obj_comp (rtems_rtl_obj_comp_t** decomp,
+ rtems_rtl_obj_cache_t* cache,
+ int fd,
+ int compression,
+ off_t offset);
+
+/**
* Lock the Run-time Linker.
*
* @return rtems_rtl_data_t* The RTL data after being locked.