summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/rtl/rtl.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-11-20 14:56:11 +1100
committerChris Johns <chrisj@rtems.org>2018-11-22 12:43:31 +1100
commit03139d5b1cf95d5b2f699e8f56e1f0ba2d7f89e4 (patch)
tree33fd489eac7497cdebe61560bc43e613b3eef0a9 /cpukit/include/rtems/rtl/rtl.h
parentlibdl: Reindex unresolved names after removing used records. (diff)
downloadrtems-03139d5b1cf95d5b2f699e8f56e1f0ba2d7f89e4.tar.bz2
libdl: Add object file dependencies to track references
Tracking references lets us manage when an object file can be unloaded. If an object file has references to it, it cannot be unloaded. Modules that depend on each other cannot be unloaded. Updates #3605
Diffstat (limited to 'cpukit/include/rtems/rtl/rtl.h')
-rw-r--r--cpukit/include/rtems/rtl/rtl.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/include/rtems/rtl/rtl.h b/cpukit/include/rtems/rtl/rtl.h
index e30dba90ef..398ac2cd3f 100644
--- a/cpukit/include/rtems/rtl/rtl.h
+++ b/cpukit/include/rtems/rtl/rtl.h
@@ -28,6 +28,7 @@
#include <rtems/rtl/rtl-obj.h>
#include <rtems/rtl/rtl-obj-cache.h>
#include <rtems/rtl/rtl-obj-comp.h>
+#include <rtems/rtl/rtl-sym.h>
#include <rtems/rtl/rtl-unresolved.h>
#ifdef __cplusplus
@@ -71,6 +72,11 @@ extern "C" {
#define RTEMS_RTL_UNRESOLVED_BLOCK_SIZE (64)
/**
+ * The number of dependency record per block in the dependency table.
+ */
+#define RTEMS_RTL_DEPENDENCY_BLOCK_SIZE (16)
+
+/**
* The global debugger interface variable.
*/
extern struct r_debug _rtld_debug;
@@ -173,6 +179,16 @@ void rtems_rtl_obj_decompress (rtems_rtl_obj_comp** decomp,
off_t offset);
/**
+ * Update the mask in the object files. You can clear flags and then set
+ * flags. A zero (0) does not clear or set the flags. This is global to all
+ * object files that are laoded.
+ *
+ * @param clear The flag's clear mask, a 0 does not clear any flags.
+ * @param set The flag's set mask, a 0 does not set any flags.
+ */
+void rtems_rtl_obj_update_flags (uint32_t clear, uint32_t set);
+
+/**
* Lock the Run-time Linker.
*
* @return rtems_rtl_data* The RTL data after being locked.
@@ -207,6 +223,15 @@ rtems_rtl_obj* rtems_rtl_check_handle (void* handle);
rtems_rtl_obj* rtems_rtl_find_obj (const char* name);
/**
+ * Find the object file a symbol is exported from.
+ *
+ * @param sym The symbol to search with.
+ * @retval NULL No object file found.
+ * @return rtems_rtl_obj* Reference to the symbol.
+ */
+rtems_rtl_obj* rtems_rtl_find_obj_with_symbol (const rtems_rtl_obj_sym* sym);
+
+/**
* Load an object file into memory relocating it. It will not be resolved
* against other symbols in other object files or the base image.
*