[PATCH 1/2] libdl: Remove _t from all structures as this is reserved for the standards
Chris Johns
chrisj at rtems.org
Thu Apr 12 07:50:21 UTC 2018
---
cpukit/include/rtems/rtl/rap.h | 6 +-
cpukit/include/rtems/rtl/rtl-allocator.h | 40 ++---
cpukit/include/rtems/rtl/rtl-fwd.h | 6 +-
cpukit/include/rtems/rtl/rtl-indirect-ptr.h | 54 +++----
cpukit/include/rtems/rtl/rtl-obj-cache.h | 32 ++--
cpukit/include/rtems/rtl/rtl-obj-comp.h | 46 +++---
cpukit/include/rtems/rtl/rtl-obj-fwd.h | 8 +-
cpukit/include/rtems/rtl/rtl-obj.h | 226 +++++++++++++--------------
cpukit/include/rtems/rtl/rtl-sym.h | 30 ++--
cpukit/include/rtems/rtl/rtl-unresolved.h | 86 +++++-----
cpukit/include/rtems/rtl/rtl.h | 82 +++++-----
cpukit/libdl/dlfcn-shell.c | 6 +-
cpukit/libdl/dlfcn.c | 22 +--
cpukit/libdl/rap.c | 70 ++++-----
cpukit/libdl/rtl-alloc-heap.c | 8 +-
cpukit/libdl/rtl-alloc-heap.h | 10 +-
cpukit/libdl/rtl-allocator.c | 38 ++---
cpukit/libdl/rtl-debugger.c | 6 +-
cpukit/libdl/rtl-elf.c | 148 +++++++++---------
cpukit/libdl/rtl-elf.h | 48 +++---
cpukit/libdl/rtl-error.c | 8 +-
cpukit/libdl/rtl-error.h | 2 +-
cpukit/libdl/rtl-mdreloc-arm.c | 42 ++---
cpukit/libdl/rtl-mdreloc-bfin.c | 42 ++---
cpukit/libdl/rtl-mdreloc-h8300.c | 42 ++---
cpukit/libdl/rtl-mdreloc-i386.c | 40 ++---
cpukit/libdl/rtl-mdreloc-lm32.c | 38 ++---
cpukit/libdl/rtl-mdreloc-m68k.c | 40 ++---
cpukit/libdl/rtl-mdreloc-mips.c | 38 ++---
cpukit/libdl/rtl-mdreloc-moxie.c | 38 ++---
cpukit/libdl/rtl-mdreloc-powerpc.c | 38 ++---
cpukit/libdl/rtl-mdreloc-sparc.c | 38 ++---
cpukit/libdl/rtl-mdreloc-v850.c | 38 ++---
cpukit/libdl/rtl-obj-cache.c | 28 ++--
cpukit/libdl/rtl-obj-comp.c | 24 +--
cpukit/libdl/rtl-obj.c | 234 ++++++++++++++--------------
cpukit/libdl/rtl-rap.c | 140 ++++++++---------
cpukit/libdl/rtl-rap.h | 12 +-
cpukit/libdl/rtl-shell.c | 76 ++++-----
cpukit/libdl/rtl-sym.c | 58 +++----
cpukit/libdl/rtl-unresolved.c | 155 +++++++++---------
cpukit/libdl/rtl-unwind-dw2.c | 16 +-
cpukit/libdl/rtl-unwind-dw2.h | 12 +-
cpukit/libdl/rtl-unwind.h | 12 +-
cpukit/libdl/rtl.c | 60 +++----
45 files changed, 1121 insertions(+), 1122 deletions(-)
diff --git a/cpukit/include/rtems/rtl/rap.h b/cpukit/include/rtems/rtl/rap.h
index 0b86553e2b..03cf096cb0 100644
--- a/cpukit/include/rtems/rtl/rap.h
+++ b/cpukit/include/rtems/rtl/rap.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2013 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2013, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -42,7 +42,7 @@ extern "C" {
/**
* The module iterator handle.
*/
-typedef bool (*rtems_rap_iterator_t) (void* handle);
+typedef bool (*rtems_rap_iterator) (void* handle);
/**
* Load an application.
@@ -78,7 +78,7 @@ void* rtems_rap_find (const char* name);
* @retval true The iterator function returned did not return false.
* @retval false The iterator function returned false..
*/
-bool rtems_rap_iterate (rtems_rap_iterator_t iterator);
+bool rtems_rap_iterate (rtems_rap_iterator iterator);
/**
* Return the name of the module given a handle.
diff --git a/cpukit/include/rtems/rtl/rtl-allocator.h b/cpukit/include/rtems/rtl/rtl-allocator.h
index e8044ee1e8..c5b3d4ec72 100644
--- a/cpukit/include/rtems/rtl/rtl-allocator.h
+++ b/cpukit/include/rtems/rtl/rtl-allocator.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -30,7 +30,7 @@ extern "C" {
* @note It is best to use the object tag for general memory allocation and to
* leave the tags with specific access properties to the module data
*/
-enum rtems_rtl_alloc_tags_e {
+enum rtems_rtl_alloc_tags {
RTEMS_RTL_ALLOC_OBJECT, /**< A generic memory object. */
RTEMS_RTL_ALLOC_SYMBOL, /**< Memory used for symbols. */
RTEMS_RTL_ALLOC_EXTERNAL, /**< Memory used for external symbols. */
@@ -42,7 +42,7 @@ enum rtems_rtl_alloc_tags_e {
/**
* The allocator tag type.
*/
-typedef enum rtems_rtl_alloc_tags_e rtems_rtl_alloc_tag_t;
+typedef enum rtems_rtl_alloc_tags rtems_rtl_alloc_tag;
/**
* The number of tags.
@@ -63,29 +63,29 @@ typedef enum rtems_rtl_alloc_tags_e rtems_rtl_alloc_tag_t;
* @param size The size of the allocation if an allocation request and
* not used if deleting or freeing a previous allocation.
*/
-typedef void (*rtems_rtl_allocator_t)(bool allocate,
- rtems_rtl_alloc_tag_t tag,
- void** address,
- size_t size);
+typedef void (*rtems_rtl_allocator)(bool allocate,
+ rtems_rtl_alloc_tag tag,
+ void** address,
+ size_t size);
/**
* The allocator data.
*/
-struct rtems_rtl_alloc_data_s {
+struct rtems_rtl_alloc_data {
/**< The memory allocator handler. */
- rtems_rtl_allocator_t allocator;
+ rtems_rtl_allocator allocator;
/**< The indirect pointer chains. */
rtems_chain_control indirects[RTEMS_RTL_ALLOC_TAGS];
};
-typedef struct rtems_rtl_alloc_data_s rtems_rtl_alloc_data_t;
+typedef struct rtems_rtl_alloc_data rtems_rtl_alloc_data;
/**
* Initialise the allocate data.
*
* @param data The data to initialise.
*/
-void rtems_rtl_alloc_initialise (rtems_rtl_alloc_data_t* data);
+void rtems_rtl_alloc_initialise (rtems_rtl_alloc_data* data);
/**
* The Runtime Loader allocator new allocates new memory and optionally clear
@@ -96,7 +96,7 @@ void rtems_rtl_alloc_initialise (rtems_rtl_alloc_data_t* data);
* @param zero If true the memory is cleared.
* @return void* The memory address or NULL is not memory available.
*/
-void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag_t tag, size_t size, bool zero);
+void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag tag, size_t size, bool zero);
/**
* The Runtime Loader allocator delete deletes allocated memory.
@@ -104,7 +104,7 @@ void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag_t tag, size_t size, bool zero);
* @param tag The type of allocation request.
* @param address The memory address to delete. A NULL is ignored.
*/
-void rtems_rtl_alloc_del (rtems_rtl_alloc_tag_t tag, void* address);
+void rtems_rtl_alloc_del (rtems_rtl_alloc_tag tag, void* address);
/**
* Hook the Runtime Loader allocatior. A handler can call the previous handler
@@ -113,9 +113,9 @@ void rtems_rtl_alloc_del (rtems_rtl_alloc_tag_t tag, void* address);
* returned.
*
* @param handler The handler to use as the allocator.
- * @return rtems_rtl_alloc_handler_t The previous handler.
+ * @return rtems_rtl_alloc_handler The previous handler.
*/
-rtems_rtl_allocator_t rtems_rtl_alloc_hook (rtems_rtl_allocator_t handler);
+rtems_rtl_allocator rtems_rtl_alloc_hook (rtems_rtl_allocator handler);
/**
* Allocate memory to an indirect handle.
@@ -124,9 +124,9 @@ rtems_rtl_allocator_t rtems_rtl_alloc_hook (rtems_rtl_allocator_t handler);
* @param handle The handle to allocate the memory to.
* @param size The size of the allocation.
*/
-void rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag_t tag,
- rtems_rtl_ptr_t* handle,
- size_t size);
+void rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag tag,
+ rtems_rtl_ptr* handle,
+ size_t size);
/**
* Free memory from an indirect handle.
@@ -134,8 +134,8 @@ void rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag_t tag,
* @param tag The type of allocation request.
* @param handle The handle to free the memory from.
*/
-void rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag_t tag,
- rtems_rtl_ptr_t* handle);
+void rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag tag,
+ rtems_rtl_ptr* handle);
/**
* Allocate the memory for a module given the size of the text, const, data and
diff --git a/cpukit/include/rtems/rtl/rtl-fwd.h b/cpukit/include/rtems/rtl/rtl-fwd.h
index 4641ad5d5e..b5b4eae495 100644
--- a/cpukit/include/rtems/rtl/rtl-fwd.h
+++ b/cpukit/include/rtems/rtl/rtl-fwd.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -23,8 +23,8 @@ extern "C" {
/**
* The forward declaration of the obj structure.
*/
-struct rtems_rtl_data_s;
-typedef struct rtems_rtl_data_s rtems_rtl_data_t;
+struct rtems_rtl_data;
+typedef struct rtems_rtl_data rtems_rtl_data;
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-indirect-ptr.h b/cpukit/include/rtems/rtl/rtl-indirect-ptr.h
index 81503a3b45..dbfa70679c 100644
--- a/cpukit/include/rtems/rtl/rtl-indirect-ptr.h
+++ b/cpukit/include/rtems/rtl/rtl-indirect-ptr.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -11,7 +11,7 @@
* @ingroup rtems_rtl
*
* @brief RTEMS Run-Time Linker Indirect Pointer Management allows memory
- * compaction in the allocator.
+ * compaction in the allocator.
*/
#if !defined (_RTEMS_RTL_INDIRECT_PTR_H_)
@@ -26,22 +26,22 @@ extern "C" {
/**
* The RTL Indirect pointer.
*/
-struct rtems_rtl_ptr_s {
+struct rtems_rtl_ptr {
rtems_chain_node node; /**< Indirect pointers are held on lists. */
void* pointer; /**< The actual pointer. */
};
-typedef struct rtems_rtl_ptr_s rtems_rtl_ptr_t;
+typedef struct rtems_rtl_ptr rtems_rtl_ptr;
/**
* The RTL Indirect size and pointer.
*/
-struct rtems_rtl_sptr_s {
- rtems_rtl_ptr_t ptr; /**< The indirect pointer. */
- size_t size; /**< The size of the memory block. */
+struct rtems_rtl_sptr {
+ rtems_rtl_ptr ptr; /**< The indirect pointer. */
+ size_t size; /**< The size of the memory block. */
};
-typedef struct rtems_rtl_sptr_s rtems_rtl_sptr_t;
+typedef struct rtems_rtl_sptr rtems_rtl_sptr;
/**
* A chain of indirect pointers for users to chain in applications.
@@ -49,12 +49,12 @@ typedef struct rtems_rtl_sptr_s rtems_rtl_sptr_t;
* @note The chain the pointer is on is internal to the allocator and cannot be
* used by applications.
*/
-struct rtems_rtl_ptr_chain_s {
+struct rtems_rtl_ptr_chain {
rtems_chain_node node; /**< Chain of indirect pointers. */
- rtems_rtl_ptr_t ptr; /**< The indirect pointer. */
+ rtems_rtl_ptr ptr; /**< The indirect pointer. */
};
-typedef struct rtems_rtl_ptr_chain_s rtems_rtl_ptr_chain_t;
+typedef struct rtems_rtl_ptr_chain rtems_rtl_ptr_chain;
/**
* A chain of indirect sized pointers for users to chain in applications.
@@ -62,12 +62,12 @@ typedef struct rtems_rtl_ptr_chain_s rtems_rtl_ptr_chain_t;
* @note The chain the pointer is on is internal to the allocator and cannot be
* used by applications.
*/
-struct rtems_rtl_sptr_chain_s {
- rtems_chain_node node; /**< Chain of indirect pointers. */
- rtems_rtl_sptr_t ptr; /**< The indirect pointer. */
+struct rtems_rtl_sptr_chain {
+ rtems_chain_node node; /**< Chain of indirect pointers. */
+ rtems_rtl_sptr ptr; /**< The indirect pointer. */
};
-typedef struct rtems_rtl_sptr_chain_s rtems_rtl_sptr_chain_t;
+typedef struct rtems_rtl_sptr_chain rtems_rtl_sptr_chain;
/**
* Get the pointer given an indirect handle.
@@ -75,7 +75,7 @@ typedef struct rtems_rtl_sptr_chain_s rtems_rtl_sptr_chain_t;
* @param handle The handle the pointer is returned from.
* @return void* The pointer held in the handle.
*/
-static inline void* rtems_rtl_ptr_get (rtems_rtl_ptr_t* handle)
+static inline void* rtems_rtl_ptr_get (rtems_rtl_ptr* handle)
{
return handle->pointer;
}
@@ -86,7 +86,7 @@ static inline void* rtems_rtl_ptr_get (rtems_rtl_ptr_t* handle)
* @param handle The handle the pointer is returned from.
* @param pointer The pointer to set in the handle.
*/
-static inline void rtems_rtl_ptr_set (rtems_rtl_ptr_t* handle, void* pointer)
+static inline void rtems_rtl_ptr_set (rtems_rtl_ptr* handle, void* pointer)
{
handle->pointer = pointer;
}
@@ -96,7 +96,7 @@ static inline void rtems_rtl_ptr_set (rtems_rtl_ptr_t* handle, void* pointer)
*
* @param handle The handle to initialise.
*/
-static inline void rtems_rtl_ptr_init (rtems_rtl_ptr_t* handle)
+static inline void rtems_rtl_ptr_init (rtems_rtl_ptr* handle)
{
rtems_chain_set_off_chain (&handle->node);
handle->pointer = NULL;
@@ -108,7 +108,7 @@ static inline void rtems_rtl_ptr_init (rtems_rtl_ptr_t* handle)
* @param handle The handle to test.
* @return bool True if the pointer is NULL.
*/
-static inline bool rtems_rtl_ptr_null (rtems_rtl_ptr_t* handle)
+static inline bool rtems_rtl_ptr_null (rtems_rtl_ptr* handle)
{
return handle->pointer == NULL;
}
@@ -120,7 +120,7 @@ static inline bool rtems_rtl_ptr_null (rtems_rtl_ptr_t* handle)
* @param src The source handle to move the pointer from.
* @param dst The destination handle to receive the pointer.
*/
-static inline void rtems_rtl_ptr_move (rtems_rtl_ptr_t* dst, rtems_rtl_ptr_t* src)
+static inline void rtems_rtl_ptr_move (rtems_rtl_ptr* dst, rtems_rtl_ptr* src)
{
/*
* We do not know which chain the src handle resides on so insert the dst
@@ -146,7 +146,7 @@ static inline void rtems_rtl_ptr_move (rtems_rtl_ptr_t* dst, rtems_rtl_ptr_t* sr
* @param handle The handle the pointer is returned from.
* @return void* The pointer held in the handle.
*/
-static inline void* rtems_rtl_sptr_get (rtems_rtl_sptr_t* handle)
+static inline void* rtems_rtl_sptr_get (rtems_rtl_sptr* handle)
{
return rtems_rtl_ptr_get (&handle->ptr);
}
@@ -157,7 +157,7 @@ static inline void* rtems_rtl_sptr_get (rtems_rtl_sptr_t* handle)
* @param handle The handle the pointer is returned from.
* @param pointer The pointer to set in the handle.
*/
-static inline void rtems_rtl_sptr_set (rtems_rtl_sptr_t* handle, void* pointer)
+static inline void rtems_rtl_sptr_set (rtems_rtl_sptr* handle, void* pointer)
{
rtems_rtl_ptr_set (&handle->ptr, pointer);
}
@@ -167,7 +167,7 @@ static inline void rtems_rtl_sptr_set (rtems_rtl_sptr_t* handle, void* pointer)
*
* @param handle The handle to initialise.
*/
-static inline void rtems_rtl_sptr_init (rtems_rtl_sptr_t* handle)
+static inline void rtems_rtl_sptr_init (rtems_rtl_sptr* handle)
{
rtems_rtl_ptr_init (&handle->ptr);
handle->size = 0;
@@ -179,7 +179,7 @@ static inline void rtems_rtl_sptr_init (rtems_rtl_sptr_t* handle)
* @param handle The handle to test.
* @return bool True if the pointer is NULL.
*/
-static inline bool rtems_rtl_sptr_null (rtems_rtl_sptr_t* handle)
+static inline bool rtems_rtl_sptr_null (rtems_rtl_sptr* handle)
{
return rtems_rtl_ptr_null (&handle->ptr);
}
@@ -191,7 +191,7 @@ static inline bool rtems_rtl_sptr_null (rtems_rtl_sptr_t* handle)
* @param src The source handle to move the pointer from.
* @param dst The destination handle to receive the pointer.
*/
-static inline void rtems_rtl_sptr_move (rtems_rtl_sptr_t* dst, rtems_rtl_sptr_t* src)
+static inline void rtems_rtl_sptr_move (rtems_rtl_sptr* dst, rtems_rtl_sptr* src)
{
rtems_rtl_ptr_move (&dst->ptr, &src->ptr);
dst->size = src->size;
@@ -204,7 +204,7 @@ static inline void rtems_rtl_sptr_move (rtems_rtl_sptr_t* dst, rtems_rtl_sptr_t*
* @param handle The handle to get the size from.
* @return size_t The size_t.
*/
-static inline size_t rtems_rtl_sptr_get_size (rtems_rtl_sptr_t* handle)
+static inline size_t rtems_rtl_sptr_get_size (rtems_rtl_sptr* handle)
{
return handle->size;
}
@@ -215,7 +215,7 @@ static inline size_t rtems_rtl_sptr_get_size (rtems_rtl_sptr_t* handle)
* @param handle The handle to set the size.
* @param size The size to set..
*/
-static inline void rtems_rtl_sptr_set_size (rtems_rtl_sptr_t* handle, size_t size)
+static inline void rtems_rtl_sptr_set_size (rtems_rtl_sptr* handle, size_t size)
{
handle->size = size;
}
diff --git a/cpukit/include/rtems/rtl/rtl-obj-cache.h b/cpukit/include/rtems/rtl/rtl-obj-cache.h
index 8eacdd316b..3613e88246 100644
--- a/cpukit/include/rtems/rtl/rtl-obj-cache.h
+++ b/cpukit/include/rtems/rtl/rtl-obj-cache.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -50,7 +50,7 @@ extern "C" {
/**
* The buffer cache.
*/
-typedef struct rtems_rtl_obj_cache_s
+typedef struct rtems_rtl_obj_cache
{
int fd; /**< The file descriptor of the data in the cache. */
size_t file_size; /**< The size of the file. */
@@ -59,7 +59,7 @@ typedef struct rtems_rtl_obj_cache_s
size_t level; /**< The amount of data in the cache. A file can be
* smaller than the cache file. */
uint8_t* buffer; /**< The buffer */
-} rtems_rtl_obj_cache_t;
+} rtems_rtl_obj_cache;
/**
* Open a cache allocating a single buffer of the size passed. The default
@@ -70,21 +70,21 @@ typedef struct rtems_rtl_obj_cache_s
* @retval true The cache is open.
* @retval false The cache is not open. The RTL error is set.
*/
-bool rtems_rtl_obj_cache_open (rtems_rtl_obj_cache_t* cache, size_t size);
+bool rtems_rtl_obj_cache_open (rtems_rtl_obj_cache* cache, size_t size);
/**
* Close a cache.
*
* @param cache The cache to close.
*/
-void rtems_rtl_obj_cache_close (rtems_rtl_obj_cache_t* cache);
+void rtems_rtl_obj_cache_close (rtems_rtl_obj_cache* cache);
/**
* Flush the cache. Any further read will read the data from the file.
*
* @param cache The cache to flush.
*/
-void rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache_t* cache);
+void rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache* cache);
/**
* Read data by reference. The length contains the amount of data that should
@@ -102,11 +102,11 @@ void rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache_t* cache);
* @retval true The data referenced is in the cache.
* @retval false The read failed and the RTL error has been set.
*/
-bool rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
- int fd,
- off_t offset,
- void** buffer,
- size_t* length);
+bool rtems_rtl_obj_cache_read (rtems_rtl_obj_cache* cache,
+ int fd,
+ off_t offset,
+ void** buffer,
+ size_t* length);
/**
* Read data by value. The data is copied to the user supplied buffer.
@@ -119,11 +119,11 @@ bool rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
* @retval true The data has been read from the cache.
* @retval false The read failed and the RTL error has been set.
*/
-bool rtems_rtl_obj_cache_read_byval (rtems_rtl_obj_cache_t* cache,
- int fd,
- off_t offset,
- void* buffer,
- size_t length);
+bool rtems_rtl_obj_cache_read_byval (rtems_rtl_obj_cache* cache,
+ int fd,
+ off_t offset,
+ void* buffer,
+ size_t length);
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-obj-comp.h b/cpukit/include/rtems/rtl/rtl-obj-comp.h
index 34bfa6ffa1..963824b277 100644
--- a/cpukit/include/rtems/rtl/rtl-obj-comp.h
+++ b/cpukit/include/rtems/rtl/rtl-obj-comp.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -43,23 +43,23 @@ extern "C" {
/**
* The compressed file.
*/
-typedef struct rtems_rtl_obj_cpmp_s
+typedef struct rtems_rtl_obj_cpmp
{
- rtems_rtl_obj_cache_t* cache; /**< The cache provides the input
+ rtems_rtl_obj_cache* cache; /**< The cache provides the input
* buffer. */
- int fd; /**< The file descriptor. */
- int compression; /**< The type of compression. */
- off_t offset; /**< The base offset of the buffer. */
- size_t size; /**< The size of the output buffer. */
- size_t level; /**< The amount of data in the buffer. */
- uint8_t* buffer; /**< The buffer */
- uint32_t read; /**< The amount of data read. */
-} rtems_rtl_obj_comp_t;
+ int fd; /**< The file descriptor. */
+ int compression; /**< The type of compression. */
+ off_t offset; /**< The base offset of the buffer. */
+ size_t size; /**< The size of the output buffer. */
+ size_t level; /**< The amount of data in the buffer. */
+ uint8_t* buffer; /**< The buffer */
+ uint32_t read; /**< The amount of data read. */
+} rtems_rtl_obj_comp;
/**
* Return the input level.
*/
-static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp_t* comp)
+static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp* comp)
{
return comp->read;
}
@@ -72,15 +72,15 @@ static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp_t* comp)
* @retval true The compressor is open.
* @retval false The compressor is not open. The RTL error is set.
*/
-bool rtems_rtl_obj_comp_open (rtems_rtl_obj_comp_t* comp,
- size_t size);
+bool rtems_rtl_obj_comp_open (rtems_rtl_obj_comp* comp,
+ size_t size);
/**
* Close a compressor.
*
* @param comp The compressor to close.
*/
-void rtems_rtl_obj_comp_close (rtems_rtl_obj_comp_t* comp);
+void rtems_rtl_obj_comp_close (rtems_rtl_obj_comp* comp);
/**
* Set the cache and offset in the file the compressed stream starts.
@@ -91,11 +91,11 @@ void rtems_rtl_obj_comp_close (rtems_rtl_obj_comp_t* comp);
* @param compression The type of compression being streamed.
* @param offset The offset in the file the compressed stream starts.
*/
-void rtems_rtl_obj_comp_set (rtems_rtl_obj_comp_t* comp,
- rtems_rtl_obj_cache_t* cache,
- int fd,
- int compression,
- off_t offset);
+void rtems_rtl_obj_comp_set (rtems_rtl_obj_comp* comp,
+ rtems_rtl_obj_cache* cache,
+ int fd,
+ int compression,
+ off_t offset);
/**
* Read decompressed data. The length contains the amount of data that should
@@ -111,9 +111,9 @@ void rtems_rtl_obj_comp_set (rtems_rtl_obj_comp_t* comp,
* @retval true The data referenced is in the cache.
* @retval false The read failed and the RTL error has been set.
*/
-bool rtems_rtl_obj_comp_read (rtems_rtl_obj_comp_t* comp,
- void* buffer,
- size_t length);
+bool rtems_rtl_obj_comp_read (rtems_rtl_obj_comp* comp,
+ void* buffer,
+ size_t length);
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-obj-fwd.h b/cpukit/include/rtems/rtl/rtl-obj-fwd.h
index 2c53244316..39e28c58e1 100644
--- a/cpukit/include/rtems/rtl/rtl-obj-fwd.h
+++ b/cpukit/include/rtems/rtl/rtl-obj-fwd.h
@@ -23,14 +23,14 @@ extern "C" {
/**
* The forward declaration of the obj section structure.
*/
-struct rtems_rtl_obj_sect_s;
-typedef struct rtems_rtl_obj_sect_s rtems_rtl_obj_sect_t;
+struct rtems_rtl_obj_sect;
+typedef struct rtems_rtl_obj_sect rtems_rtl_obj_sect;
/**
* The forward declaration of the obj structure.
*/
-struct rtems_rtl_obj_s;
-typedef struct rtems_rtl_obj_s rtems_rtl_obj_t;
+struct rtems_rtl_obj;
+typedef struct rtems_rtl_obj rtems_rtl_obj;
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-obj.h b/cpukit/include/rtems/rtl/rtl-obj.h
index 6a35a72822..ff7b2a197d 100644
--- a/cpukit/include/rtems/rtl/rtl-obj.h
+++ b/cpukit/include/rtems/rtl/rtl-obj.h
@@ -35,7 +35,7 @@ extern "C" {
/**
* Loader format definition.
*/
-typedef struct rtems_rtl_loader_format_s
+typedef struct rtems_rtl_loader_format
{
/**
* The format label. This can be used to determine and manage
@@ -47,42 +47,42 @@ typedef struct rtems_rtl_loader_format_s
* The format flags.
*/
uint32_t flags;
-} rtems_rtl_loader_format_t;
+} rtems_rtl_loader_format;
/**
* The type of the format loader check handler. This handler checks the format
* and if it is detected as suitable it returns true.
*/
-typedef bool (*rtems_rtl_loader_check) (rtems_rtl_obj_t* obj, int fd);
+typedef bool (*rtems_rtl_loader_check) (rtems_rtl_obj* obj, int fd);
/**
* The type of the format loader load handler. This handler loads the specific
* format.
*/
-typedef bool (*rtems_rtl_loader_load) (rtems_rtl_obj_t* obj, int fd);
+typedef bool (*rtems_rtl_loader_load) (rtems_rtl_obj* obj, int fd);
/**
* The type of the format loader unload handler. This handler unloads the
* specific format.
*/
-typedef bool (*rtems_rtl_loader_unload) (rtems_rtl_obj_t* obj);
+typedef bool (*rtems_rtl_loader_unload) (rtems_rtl_obj* obj);
/**
* The type of the format loader signature handler. This handler checks the
* format signature.
*/
-typedef rtems_rtl_loader_format_t* (*rtems_rtl_loader_sig) (void);
+typedef rtems_rtl_loader_format* (*rtems_rtl_loader_sig) (void);
/**
* Table for supported loadable formats.
*/
-typedef struct rtems_rtl_loader_table_s
+typedef struct rtems_rtl_loader_table
{
rtems_rtl_loader_check check; /**< The check handler. */
rtems_rtl_loader_load load; /**< The loader. */
rtems_rtl_loader_unload unload; /**< The unloader. */
rtems_rtl_loader_sig signature; /**< The loader's signature. */
-} rtems_rtl_loader_table_t;
+} rtems_rtl_loader_table;
/**
* Flags for the various section types.
@@ -121,7 +121,7 @@ typedef struct rtems_rtl_loader_table_s
* one of a specific type of sections. All sections and grouped
* together in memory.
*/
-struct rtems_rtl_obj_sect_s
+struct rtems_rtl_obj_sect
{
rtems_chain_node node; /**< The node's link in the chain. */
int section; /**< The section number. */
@@ -150,51 +150,51 @@ struct rtems_rtl_obj_sect_s
* RTL Object. There is one for each object module loaded plus one for the base
* kernel image.
*/
-struct rtems_rtl_obj_s
+struct rtems_rtl_obj
{
- rtems_chain_node link; /**< The node's link in the chain. */
- uint32_t flags; /**< The status of the object file. */
- uint32_t users; /**< References to the object file. */
- int format; /**< The format of the object file. */
- const char* fname; /**< The file name for the object. */
- const char* oname; /**< The object file name. Can be
- * relative. */
- const char* aname; /**< The archive name containing the
- * object. NULL means the object is not
- * in a lib */
- off_t ooffset; /**< The object offset in the archive. */
- size_t fsize; /**< Size of the object file. */
- rtems_chain_control sections; /**< The sections of interest in the
- * object file. */
- rtems_rtl_obj_sym_t* local_table; /**< Local symbol table. */
- size_t local_syms; /**< Local symbol count. */
- size_t local_size; /**< Local symbol memory usage. */
- rtems_rtl_obj_sym_t* global_table; /**< Global symbol table. */
- size_t global_syms; /**< Global symbol count. */
- size_t global_size; /**< Global symbol memory usage. */
- uint32_t unresolved; /**< The number of unresolved relocations. */
- void* text_base; /**< The base address of the text section
- * in memory. */
- size_t text_size; /**< The size of the text section. */
- void* const_base; /**< The base address of the const section
- * in memory. */
- void* eh_base; /**< The base address of the eh section
- * in memory. */
- size_t eh_size; /**< The size of the eh section. */
- void* data_base; /**< The base address of the data section
- * in memory. */
- void* bss_base; /**< The base address of the bss section
- * in memory. */
- size_t bss_size; /**< The size of the bss section. */
- size_t exec_size; /**< The amount of executable memory
- * allocated */
- void* entry; /**< The entry point of the module. */
- uint32_t checksum; /**< The checksum of the text sections. A
- * zero means do not checksum. */
- uint32_t* sec_num; /**< The sec nums of each obj. */
- uint32_t obj_num; /**< The count of elf files in an rtl obj. */
- struct link_map* linkmap; /**< For GDB. */
- void* loader; /**< The file details specific to a loader. */
+ rtems_chain_node link; /**< The node's link in the chain. */
+ uint32_t flags; /**< The status of the object file. */
+ uint32_t users; /**< References to the object file. */
+ int format; /**< The format of the object file. */
+ const char* fname; /**< The file name for the object. */
+ const char* oname; /**< The object file name. Can be
+ * relative. */
+ const char* aname; /**< The archive name containing the
+ * object. NULL means the object is not
+ * in a lib */
+ off_t ooffset; /**< The object offset in the archive. */
+ size_t fsize; /**< Size of the object file. */
+ rtems_chain_control sections; /**< The sections of interest in the
+ * object file. */
+ rtems_rtl_obj_sym* local_table; /**< Local symbol table. */
+ size_t local_syms; /**< Local symbol count. */
+ size_t local_size; /**< Local symbol memory usage. */
+ rtems_rtl_obj_sym* global_table; /**< Global symbol table. */
+ size_t global_syms; /**< Global symbol count. */
+ size_t global_size; /**< Global symbol memory usage. */
+ uint32_t unresolved; /**< The number of unresolved relocations. */
+ void* text_base; /**< The base address of the text section
+ * in memory. */
+ size_t text_size; /**< The size of the text section. */
+ void* const_base; /**< The base address of the const section
+ * in memory. */
+ void* eh_base; /**< The base address of the eh section
+ * in memory. */
+ size_t eh_size; /**< The size of the eh section. */
+ void* data_base; /**< The base address of the data section
+ * in memory. */
+ void* bss_base; /**< The base address of the bss section
+ * in memory. */
+ size_t bss_size; /**< The size of the bss section. */
+ size_t exec_size; /**< The amount of executable memory
+ * allocated */
+ void* entry; /**< The entry point of the module. */
+ uint32_t checksum; /**< The checksum of the text sections. A
+ * zero means do not checksum. */
+ uint32_t* sec_num; /**< The sec nums of each obj. */
+ uint32_t obj_num; /**< The count of elf files in an rtl obj. */
+ struct link_map* linkmap; /**< For GDB. */
+ void* loader; /**< The file details specific to a loader. */
};
/**
@@ -208,10 +208,10 @@ struct rtems_rtl_obj_s
* @retval true The operation was successful.
* @retval false The operation failed and the RTL has been set.
*/
-typedef bool (*rtems_rtl_obj_sect_handler_t)(rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_t* sect,
- void* data);
+typedef bool (*rtems_rtl_obj_sect_handler)(rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect* sect,
+ void* data);
/**
* Get the file name.
@@ -219,7 +219,7 @@ typedef bool (*rtems_rtl_obj_sect_handler_t)(rtems_rtl_obj_t* obj,
* @param obj The object file.
* @return const char* The string.
*/
-static inline const char* rtems_rtl_obj_fname (const rtems_rtl_obj_t* obj)
+static inline const char* rtems_rtl_obj_fname (const rtems_rtl_obj* obj)
{
return obj->fname;
}
@@ -230,7 +230,7 @@ static inline const char* rtems_rtl_obj_fname (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return bool There is a file name
*/
-static inline bool rtems_rtl_obj_fname_valid (const rtems_rtl_obj_t* obj)
+static inline bool rtems_rtl_obj_fname_valid (const rtems_rtl_obj* obj)
{
return obj->fname;
}
@@ -241,7 +241,7 @@ static inline bool rtems_rtl_obj_fname_valid (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return const char* The string.
*/
-static inline const char* rtems_rtl_obj_oname (const rtems_rtl_obj_t* obj)
+static inline const char* rtems_rtl_obj_oname (const rtems_rtl_obj* obj)
{
return obj->oname;
}
@@ -252,7 +252,7 @@ static inline const char* rtems_rtl_obj_oname (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return bool There is an object name
*/
-static inline bool rtems_rtl_obj_oname_valid (const rtems_rtl_obj_t* obj)
+static inline bool rtems_rtl_obj_oname_valid (const rtems_rtl_obj* obj)
{
return obj->oname;
}
@@ -263,7 +263,7 @@ static inline bool rtems_rtl_obj_oname_valid (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return const char* The string.
*/
-static inline const char* rtems_rtl_obj_aname (const rtems_rtl_obj_t* obj)
+static inline const char* rtems_rtl_obj_aname (const rtems_rtl_obj* obj)
{
return obj->aname;
}
@@ -274,7 +274,7 @@ static inline const char* rtems_rtl_obj_aname (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return bool There is an archive name
*/
-static inline bool rtems_rtl_obj_aname_valid (const rtems_rtl_obj_t* obj)
+static inline bool rtems_rtl_obj_aname_valid (const rtems_rtl_obj* obj)
{
return obj->aname;
}
@@ -285,8 +285,8 @@ static inline bool rtems_rtl_obj_aname_valid (const rtems_rtl_obj_t* obj)
* @param obj The object file.
* @return bool There is an archive name
*/
-static inline bool rtems_rtl_obj_text_inside (const rtems_rtl_obj_t* obj,
- const void* address)
+static inline bool rtems_rtl_obj_text_inside (const rtems_rtl_obj* obj,
+ const void* address)
{
return
(address >= obj->text_base) &&
@@ -298,7 +298,7 @@ static inline bool rtems_rtl_obj_text_inside (const rtems_rtl_obj_t* obj,
*
* @retval NULL No memory for the object.
*/
-rtems_rtl_obj_t* rtems_rtl_obj_alloc (void);
+rtems_rtl_obj* rtems_rtl_obj_alloc (void);
/**
* Free the object structure and related resources.
@@ -307,7 +307,7 @@ rtems_rtl_obj_t* rtems_rtl_obj_alloc (void);
* @retval false The object has dependences.
* @retval true The object has been freed.
*/
-bool rtems_rtl_obj_free (rtems_rtl_obj_t* obj);
+bool rtems_rtl_obj_free (rtems_rtl_obj* obj);
/**
* Does the object file have unresolved external references ? If it does the
@@ -317,7 +317,7 @@ bool rtems_rtl_obj_free (rtems_rtl_obj_t* obj);
* @retval true The object file has unresolved externals.
* @retval false The object file has all external references resolved.
*/
-bool rtems_rtl_obj_unresolved (rtems_rtl_obj_t* obj);
+bool rtems_rtl_obj_unresolved (rtems_rtl_obj* obj);
/**
* Parses a filename and returns newly allocated strings with the archive name,
@@ -341,7 +341,7 @@ bool rtems_rtl_parse_name (const char* name,
* @param obj The object file's descriptor.
* @param name The name to match.
*/
-bool rtems_rtl_match_name (rtems_rtl_obj_t* obj, const char* name);
+bool rtems_rtl_match_name (rtems_rtl_obj* obj, const char* name);
/**
* Find an object file on disk that matches the name. The object descriptor is
@@ -353,7 +353,7 @@ bool rtems_rtl_match_name (rtems_rtl_obj_t* obj, const char* name);
* @retval true The file has been found.
* @retval false The file could not be located. The RTL error has been set.
*/
-bool rtems_rtl_obj_find_file (rtems_rtl_obj_t* obj, const char* name);
+bool rtems_rtl_obj_find_file (rtems_rtl_obj* obj, const char* name);
/**
* Add a section to the object descriptor.
@@ -370,22 +370,22 @@ bool rtems_rtl_obj_find_file (rtems_rtl_obj_t* obj, const char* name);
* @retval true The section has been added.
* @retval false The section has not been added. See the RTL error.
*/
-bool rtems_rtl_obj_add_section (rtems_rtl_obj_t* obj,
- int section,
- const char* name,
- size_t size,
- off_t offset,
- uint32_t alignment,
- int link,
- int info,
- uint32_t flags);
+bool rtems_rtl_obj_add_section (rtems_rtl_obj* obj,
+ int section,
+ const char* name,
+ size_t size,
+ off_t offset,
+ uint32_t alignment,
+ int link,
+ int info,
+ uint32_t flags);
/**
* Erase the object file descriptor's sections.
*
* @param obj The object file's descriptor.
*/
-void rtems_rtl_obj_erase_sections (rtems_rtl_obj_t* obj);
+void rtems_rtl_obj_erase_sections (rtems_rtl_obj* obj);
/**
* Find the section given a name.
@@ -395,8 +395,8 @@ void rtems_rtl_obj_erase_sections (rtems_rtl_obj_t* obj);
* @retval NULL The section was not found.
* @return rtems_rtl_obj_sect_t* The named section.
*/
-rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
- const char* name);
+rtems_rtl_obj_sect* rtems_rtl_obj_find_section (const rtems_rtl_obj* obj,
+ const char* name);
/**
* Find a section given a section's index number.
@@ -406,8 +406,8 @@ rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
* @retval NULL The section was not found.
* @return rtems_rtl_obj_sect_t* The found section.
*/
-rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t* obj,
- int index);
+rtems_rtl_obj_sect* rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj* obj,
+ int index);
/**
* The text section size. Only use once all the sections has been added. It
@@ -417,7 +417,7 @@ rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t
* @param obj The object file's descriptor.
* @return size_t The size of the text area of the object file.
*/
-size_t rtems_rtl_obj_text_size (const rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_text_size (const rtems_rtl_obj* obj);
/**
* The text section alignment for the object file. Only use once all the
@@ -430,7 +430,7 @@ size_t rtems_rtl_obj_text_size (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return uint32_t The alignment. Can be 0 or 1 for not aligned or the alignment.
*/
-uint32_t rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_text_alignment (const rtems_rtl_obj* obj);
/**
* The const section size. Only use once all the sections has been added. It
@@ -440,7 +440,7 @@ uint32_t rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return size_t The size of the const area of the object file.
*/
-size_t rtems_rtl_obj_const_size (const rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_const_size (const rtems_rtl_obj* obj);
/**
* The const section alignment for the object file. Only use once all the
@@ -453,7 +453,7 @@ size_t rtems_rtl_obj_const_size (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return uint32_t The alignment. Can be 0 or 1 for not aligned or the alignment.
*/
-uint32_t rtems_rtl_obj_const_alignment (const rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_const_alignment (const rtems_rtl_obj* obj);
/**
* The eh section size. Only use once all the sections has been added. It
@@ -462,7 +462,7 @@ uint32_t rtems_rtl_obj_const_alignment (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return size_t The size of the bss area of the object file.
*/
-size_t rtems_rtl_obj_eh_size (const rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_eh_size (const rtems_rtl_obj* obj);
/**
* The eh section alignment for the object file. Only use once all the sections
@@ -475,7 +475,7 @@ size_t rtems_rtl_obj_eh_size (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return uint32_t The alignment. Can be 0 or 1 for not aligned or the alignment.
*/
-uint32_t rtems_rtl_obj_eh_alignment (const rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_eh_alignment (const rtems_rtl_obj* obj);
/**
* The data section size. Only use once all the sections has been added. It
@@ -485,7 +485,7 @@ uint32_t rtems_rtl_obj_eh_alignment (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return size_t The size of the data area of the object file.
*/
-size_t rtems_rtl_obj_data_size (const rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_data_size (const rtems_rtl_obj* obj);
/**
* The data section alignment for the object file. Only use once all the
@@ -498,7 +498,7 @@ size_t rtems_rtl_obj_data_size (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return uint32_t The alignment. Can be 0 or 1 for not aligned or the alignment.
*/
-uint32_t rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_data_alignment (const rtems_rtl_obj* obj);
/**
* The bss section size. Only use once all the sections has been added. It
@@ -507,7 +507,7 @@ uint32_t rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return size_t The size of the bss area of the object file.
*/
-size_t rtems_rtl_obj_bss_size (const rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_bss_size (const rtems_rtl_obj* obj);
/**
* The bss section alignment for the object file. Only use once all the
@@ -520,7 +520,7 @@ size_t rtems_rtl_obj_bss_size (const rtems_rtl_obj_t* obj);
* @param obj The object file's descriptor.
* @return uint32_t The alignment. Can be 0 or 1 for not aligned or the alignment.
*/
-uint32_t rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_bss_alignment (const rtems_rtl_obj* obj);
/**
* Relocate the object file. The object file's section are parsed for any
@@ -533,17 +533,17 @@ uint32_t rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t* obj);
* @retval true The object file was relocated.
* @retval false The relocation failed. The RTL error is set.
*/
-bool rtems_rtl_obj_relocate (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data);
+bool rtems_rtl_obj_relocate (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data);
/**
* Synchronize caches to make code visible to CPU(s)
*
* @param obj The object file's descriptor.
*/
-void rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t* obj);
+void rtems_rtl_obj_synchronize_cache (rtems_rtl_obj* obj);
/**
* Relocate an object file's unresolved reference.
@@ -553,8 +553,8 @@ void rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t* obj);
* @retval true The object file record was relocated.
* @retval false The relocation failed. The RTL error is set.
*/
-bool rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
- rtems_rtl_obj_sym_t* sym);
+bool rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc* reloc,
+ rtems_rtl_obj_sym* sym);
/**
* Load the symbols from the object file. Only the exported or public symbols
@@ -567,10 +567,10 @@ bool rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
* @retval true The object file's symbol where loaded.
* @retval false The symbol loading failed. The RTL error is set.
*/
-bool rtems_rtl_obj_load_symbols (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data);
+bool rtems_rtl_obj_load_symbols (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data);
/**
* Load the sections that have been allocated memory in the target. The bss
@@ -584,10 +584,10 @@ bool rtems_rtl_obj_load_symbols (rtems_rtl_obj_t* obj,
* @retval true The object has been sucessfully loaded.
* @retval false The load failed. The RTL error has been set.
*/
-bool rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data);
+bool rtems_rtl_obj_load_sections (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data);
/**
* Invoke the constructors the object has. Constructors are a table of pointers
@@ -597,7 +597,7 @@ bool rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
*
* @param obj The object file's descriptor.
*/
-void rtems_rtl_obj_run_ctors (rtems_rtl_obj_t* obj);
+void rtems_rtl_obj_run_ctors (rtems_rtl_obj* obj);
/**
* Invoke the destructors the object has. Destructors are a table of pointers
@@ -607,7 +607,7 @@ void rtems_rtl_obj_run_ctors (rtems_rtl_obj_t* obj);
*
* @param obj The object file's descriptor.
*/
-void rtems_rtl_obj_run_dtors (rtems_rtl_obj_t* obj);
+void rtems_rtl_obj_run_dtors (rtems_rtl_obj* obj);
/**
* Load the object file, reading all sections into memory, symbols and
@@ -617,7 +617,7 @@ void rtems_rtl_obj_run_dtors (rtems_rtl_obj_t* obj);
* @retval true The object file has been loaded.
* @retval false The load failed. The RTL error has been set.
*/
-bool rtems_rtl_obj_load (rtems_rtl_obj_t* obj);
+bool rtems_rtl_obj_load (rtems_rtl_obj* obj);
/**
* Unload the object file, erasing all symbols and releasing all memory.
@@ -626,7 +626,7 @@ bool rtems_rtl_obj_load (rtems_rtl_obj_t* obj);
* @retval true The object file has been unloaded.
* @retval false The unload failed. The RTL error has been set.
*/
-bool rtems_rtl_obj_unload (rtems_rtl_obj_t* obj);
+bool rtems_rtl_obj_unload (rtems_rtl_obj* obj);
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-sym.h b/cpukit/include/rtems/rtl/rtl-sym.h
index fe00da89d7..be246a908d 100644
--- a/cpukit/include/rtems/rtl/rtl-sym.h
+++ b/cpukit/include/rtems/rtl/rtl-sym.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012-2014 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2014, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -26,22 +26,22 @@ extern "C" {
/**
* An object file symbol.
*/
-typedef struct rtems_rtl_obj_sym_s
+typedef struct rtems_rtl_obj_sym
{
rtems_chain_node node; /**< The node's link in the chain. */
const char* name; /**< The symbol's name. */
void* value; /**< The value of the symbol. */
uint32_t data; /**< Format specific data. */
-} rtems_rtl_obj_sym_t;
+} rtems_rtl_obj_sym;
/**
* Table of symbols stored in a hash table.
*/
-typedef struct rtems_rtl_symbols_s
+typedef struct rtems_rtl_symbols
{
rtems_chain_control* buckets;
size_t nbuckets;
-} rtems_rtl_symbols_t;
+} rtems_rtl_symbols;
/**
* Open a symbol table with the specified number of buckets.
@@ -52,15 +52,15 @@ typedef struct rtems_rtl_symbols_s
* @retval false The symbol table could not created. The RTL
* error has the error.
*/
-bool rtems_rtl_symbol_table_open (rtems_rtl_symbols_t* symbols,
- size_t buckets);
+bool rtems_rtl_symbol_table_open (rtems_rtl_symbols* symbols,
+ size_t buckets);
/**
* Close the table and erase the hash table.
*
* @param symbols Close the symbol table.
*/
-void rtems_rtl_symbol_table_close (rtems_rtl_symbols_t* symbols);
+void rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols);
/**
* Add a table of exported symbols to the symbol table.
@@ -83,7 +83,7 @@ void rtems_rtl_symbol_table_close (rtems_rtl_symbols_t* symbols);
* @param esyms The exported symbol table.
* @param size The size of the table in bytes.
*/
-bool rtems_rtl_symbol_global_add (rtems_rtl_obj_t* obj,
+bool rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size);
@@ -94,7 +94,7 @@ bool rtems_rtl_symbol_global_add (rtems_rtl_obj_t* obj,
* @retval NULL No symbol found.
* @return rtems_rtl_obj_sym_t* Reference to the symbol.
*/
-rtems_rtl_obj_sym_t* rtems_rtl_symbol_global_find (const char* name);
+rtems_rtl_obj_sym* rtems_rtl_symbol_global_find (const char* name);
/**
* Find a symbol given the symbol label in the local object file.
@@ -104,29 +104,29 @@ rtems_rtl_obj_sym_t* rtems_rtl_symbol_global_find (const char* name);
* @retval NULL No symbol found.
* @return rtems_rtl_obj_sym_t* Reference to the symbol.
*/
-rtems_rtl_obj_sym_t* rtems_rtl_symbol_obj_find (rtems_rtl_obj_t* obj,
- const char* name);
+rtems_rtl_obj_sym* rtems_rtl_symbol_obj_find (rtems_rtl_obj* obj,
+ const char* name);
/**
* Add the object file's symbols to the global table.
*
* @param obj The object file the symbols are to be added.
*/
-void rtems_rtl_symbol_obj_add (rtems_rtl_obj_t* obj);
+void rtems_rtl_symbol_obj_add (rtems_rtl_obj* obj);
/**
* Erase the object file's local symbols.
*
* @param obj The object file the local symbols are to be erased from.
*/
-void rtems_rtl_symbol_obj_erase_local (rtems_rtl_obj_t* obj);
+void rtems_rtl_symbol_obj_erase_local (rtems_rtl_obj* obj);
/**
* Erase the object file's symbols.
*
* @param obj The object file the symbols are to be erased from.
*/
-void rtems_rtl_symbol_obj_erase (rtems_rtl_obj_t* obj);
+void rtems_rtl_symbol_obj_erase (rtems_rtl_obj* obj);
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl-unresolved.h b/cpukit/include/rtems/rtl/rtl-unresolved.h
index bd4ce2a215..884d909fa6 100644
--- a/cpukit/include/rtems/rtl/rtl-unresolved.h
+++ b/cpukit/include/rtems/rtl/rtl-unresolved.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -63,75 +63,75 @@ extern "C" {
* Hack to work around machine size. This needs to be cleaned up
* to better support 64bit targets.
*/
-typedef uint32_t rtems_rtl_word_t;
+typedef uint32_t rtems_rtl_word;
/**
* The types of records in the blocks.
*/
-typedef enum rtems_rtl_unresolved_rtype_e
+typedef enum rtems_rtl_unresolved_rtype
{
rtems_rtl_unresolved_empty = 0, /**< The records is empty. Must always be 0 */
rtems_rtl_unresolved_name = 1, /**< The record is a name. */
rtems_rtl_unresolved_reloc = 2 /**< The record is a relocation record. */
-} rtems_rtl_unresolved_rtype_t;
+} rtems_rtl_unresolved_rtype;
/**
* Unresolved externals symbol names. The names are reference counted and
* separate from the relocation records because a number of records could
* reference the same symbol name.
*/
-typedef struct rtems_rtl_unresolv_name_s
+typedef struct rtems_rtl_unresolv_name
{
- uint16_t refs; /**< The number of references to this name. */
- uint16_t length; /**< The length of this name. */
+ uint16_t refs; /**< The number of references to this name. */
+ uint16_t length; /**< The length of this name. */
const char name[12]; /**< The symbol name. */
-} rtems_rtl_unresolv_name_t;
+} rtems_rtl_unresolv_name;
/**
* Unresolved externals symbols require the relocation records to be held
* and references.
*/
-typedef struct rtems_rtl_unresolv_reloc_s
+typedef struct rtems_rtl_unresolv_reloc
{
- rtems_rtl_obj_t* obj; /**< The relocation's object file. */
- uint16_t flags; /**< Format specific flags. */
- uint16_t name; /**< The symbol's name. */
- uint16_t sect; /**< The target section. */
- rtems_rtl_word_t rel[3]; /**< Relocation record. */
-} rtems_rtl_unresolv_reloc_t;
+ rtems_rtl_obj* obj; /**< The relocation's object file. */
+ uint16_t flags; /**< Format specific flags. */
+ uint16_t name; /**< The symbol's name. */
+ uint16_t sect; /**< The target section. */
+ rtems_rtl_word rel[3]; /**< Relocation record. */
+} rtems_rtl_unresolv_reloc;
/**
* Unresolved externals records.
*/
-typedef struct rtems_rtl_unresolv_rec_s
+typedef struct rtems_rtl_unresolv_rec
{
- rtems_rtl_unresolved_rtype_t type;
+ rtems_rtl_unresolved_rtype type;
union
{
- rtems_rtl_unresolv_name_t name; /**< The name, or */
- rtems_rtl_unresolv_reloc_t reloc; /**< the relocation record. */
+ rtems_rtl_unresolv_name name; /**< The name, or */
+ rtems_rtl_unresolv_reloc reloc; /**< the relocation record. */
} rec;
-} rtems_rtl_unresolv_rec_t;
+} rtems_rtl_unresolv_rec;
/**
* Unresolved blocks.
*/
-typedef struct rtems_rtl_unresolv_block_s
+typedef struct rtems_rtl_unresolv_block
{
- rtems_chain_node link; /**< Blocks are chained. */
- uint32_t recs; /**< The number of records in the block. */
- rtems_rtl_unresolv_rec_t rec; /**< The records. More follow. */
-} rtems_rtl_unresolv_block_t;
+ rtems_chain_node link; /**< Blocks are chained. */
+ uint32_t recs; /**< The number of records in the block. */
+ rtems_rtl_unresolv_rec rec; /**< The records. More follow. */
+} rtems_rtl_unresolv_block;
/**
* Unresolved table holds the names and relocations.
*/
-typedef struct rtems_rtl_unresolved_s
+typedef struct rtems_rtl_unresolved
{
uint32_t marker;
size_t block_recs; /**< The records per blocks allocated. */
rtems_chain_control blocks; /**< List of blocks. */
-} rtems_rtl_unresolved_t;
+} rtems_rtl_unresolved;
/**
* The iterator function used to iterate over the unresolved table.
@@ -141,8 +141,8 @@ typedef struct rtems_rtl_unresolved_s
* @retval true The iterator has finished.
* @retval false The iterator has not finished. Keep iterating.
*/
-typedef bool rtems_rtl_unresolved_iterator_t (rtems_rtl_unresolv_rec_t* rec,
- void* data);
+typedef bool rtems_rtl_unresolved_iterator (rtems_rtl_unresolv_rec* rec,
+ void* data);
/**
* Open an unresolved relocation table.
@@ -153,21 +153,21 @@ typedef bool rtems_rtl_unresolved_iterator_t (rtems_rtl_unresolv_rec_t* rec,
* @retval false The unresolved relocation table could not created. The RTL
* error has the error.
*/
-bool rtems_rtl_unresolved_table_open (rtems_rtl_unresolved_t* unresolved,
- size_t block_records);
+bool rtems_rtl_unresolved_table_open (rtems_rtl_unresolved* unresolved,
+ size_t block_records);
/**
* Close the table and erase the blocks.
*
* @param unreolved Close the unresolved table.
*/
-void rtems_rtl_unresolved_table_close (rtems_rtl_unresolved_t* unresolved);
+void rtems_rtl_unresolved_table_close (rtems_rtl_unresolved* unresolved);
/**
* Iterate over the table of unresolved entries.
*/
-bool rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator_t iterator,
- void* data);
+bool rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator iterator,
+ void* data);
/**
* Add a relocation to the list of unresolved relocations.
@@ -181,11 +181,11 @@ bool rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator_t iterator,
* @retval true The relocation has been added.
* @retval false The relocation could not be added.
*/
-bool rtems_rtl_unresolved_add (rtems_rtl_obj_t* obj,
- const uint16_t flags,
- const char* name,
- const uint16_t sect,
- const rtems_rtl_word_t* rel);
+bool rtems_rtl_unresolved_add (rtems_rtl_obj* obj,
+ const uint16_t flags,
+ const char* name,
+ const uint16_t sect,
+ const rtems_rtl_word* rel);
/**
* Resolve the unresolved symbols.
@@ -200,10 +200,10 @@ void rtems_rtl_unresolved_resolve (void);
* @param esyms The exported symbol table.
* @param size The size of the table in bytes.
*/
-bool rtems_rtl_unresolved_remove (rtems_rtl_obj_t* obj,
- const char* name,
- const uint16_t sect,
- const rtems_rtl_word_t* rel);
+bool rtems_rtl_unresolved_remove (rtems_rtl_obj* obj,
+ const char* name,
+ const uint16_t sect,
+ const rtems_rtl_word* rel);
#ifdef __cplusplus
}
diff --git a/cpukit/include/rtems/rtl/rtl.h b/cpukit/include/rtems/rtl/rtl.h
index 513a6741aa..e30dba90ef 100644
--- a/cpukit/include/rtems/rtl/rtl.h
+++ b/cpukit/include/rtems/rtl/rtl.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -84,7 +84,7 @@ extern void _rtld_debug_state (void);
/**
* The type of constructor/destructor function.
*/
-typedef void (*rtems_rtl_cdtor_t)(void);
+typedef void (*rtems_rtl_cdtor)(void);
/**
* The global RTL data. This structure is allocated on the heap when the first
@@ -94,48 +94,48 @@ typedef void (*rtems_rtl_cdtor_t)(void);
* actual symbols are part of the object's structure. If this is a problem we
* could look at a hash table per object file.
*/
-struct rtems_rtl_data_s
+struct rtems_rtl_data
{
- rtems_recursive_mutex lock; /**< The RTL lock */
- rtems_rtl_alloc_data_t allocator; /**< The allocator data. */
- rtems_chain_control objects; /**< List if loaded object files. */
- const char* paths; /**< Search paths for archives. */
- rtems_rtl_symbols_t globals; /**< Global symbol table. */
- rtems_rtl_unresolved_t unresolved; /**< Unresolved symbols. */
- rtems_rtl_obj_t* base; /**< Base object file. */
- 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. */
+ rtems_recursive_mutex lock; /**< The RTL lock */
+ rtems_rtl_alloc_data allocator; /**< The allocator data. */
+ rtems_chain_control objects; /**< List if loaded object files. */
+ const char* paths; /**< Search paths for archives. */
+ rtems_rtl_symbols globals; /**< Global symbol table. */
+ rtems_rtl_unresolved unresolved; /**< Unresolved symbols. */
+ rtems_rtl_obj* base; /**< Base object file. */
+ rtems_rtl_obj_cache symbols; /**< Symbols object file cache. */
+ rtems_rtl_obj_cache strings; /**< Strings object file cache. */
+ rtems_rtl_obj_cache relocs; /**< Relocations object file cache. */
+ rtems_rtl_obj_comp decomp; /**< The decompression compressor. */
+ int last_errno; /**< Last error number. */
+ char last_error[64]; /**< Last error string. */
};
/**
* Get the RTL data with out locking. This call assumes the RTL is locked.
*
- * @return rtems_rtl_data_t* The RTL data after being locked.
+ * @return rtems_rtl_data* The RTL data after being locked.
* @retval NULL The RTL data is not initialised.
*/
-rtems_rtl_data_t* rtems_rtl_data (void);
+rtems_rtl_data* rtems_rtl_data_unprotected (void);
/**
* Get the RTL global symbol table with out locking. This call assmes the RTL
* is locked.
*
- * @return rtems_rtl_symbols_t* The RTL global symbols after being locked.
+ * @return rtems_rtl_symbols* The RTL global symbols after being locked.
* @retval NULL The RTL data is not initialised.
*/
-rtems_rtl_symbols_t* rtems_rtl_global_symbols (void);
+rtems_rtl_symbols* rtems_rtl_global_symbols (void);
/**
* Get the RTL resolved table with out locking. This call assmes the RTL
* is locked.
*
- * @return rtems_rtl_unresolv_t* The RTL unresolved symbols and reloc records.
+ * @return rtems_rtl_unresolv* The RTL unresolved symbols and reloc records.
* @retval NULL The RTL data is not initialised.
*/
-rtems_rtl_unresolved_t* rtems_rtl_unresolved (void);
+rtems_rtl_unresolved* rtems_rtl_unresolved_unprotected (void);
/**
* Get the RTL symbols, strings, or relocations object file caches. This call
@@ -148,9 +148,9 @@ rtems_rtl_unresolved_t* rtems_rtl_unresolved (void);
* @param relocs Pointer to the location to set the cache into. Returns NULL
* is rtl is not initialised. If NULL is passed in no value set.
*/
-void rtems_rtl_obj_caches (rtems_rtl_obj_cache_t** symbols,
- rtems_rtl_obj_cache_t** strings,
- rtems_rtl_obj_cache_t** relocs);
+void rtems_rtl_obj_caches (rtems_rtl_obj_cache** symbols,
+ rtems_rtl_obj_cache** strings,
+ rtems_rtl_obj_cache** relocs);
/**
* Flush all the object file caches.
@@ -158,28 +158,28 @@ 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.
+ * Get the RTL decompressor setting for the cache and the offset in the file
+ * the compressed stream starts. This call assumes 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);
+void rtems_rtl_obj_decompress (rtems_rtl_obj_comp** decomp,
+ rtems_rtl_obj_cache* cache,
+ int fd,
+ int compression,
+ off_t offset);
/**
* Lock the Run-time Linker.
*
- * @return rtems_rtl_data_t* The RTL data after being locked.
+ * @return rtems_rtl_data* The RTL data after being locked.
* @retval NULL The RTL data could not be initialised or locked. Typically this
* means the lock could not be created.
*/
-rtems_rtl_data_t* rtems_rtl_lock (void);
+rtems_rtl_data* rtems_rtl_lock (void);
/**
* Unlock the Run-time Linker.
@@ -195,16 +195,16 @@ void rtems_rtl_unlock (void);
* @param handle Pointer to the object file to be validated.
* @return rtl_obj* The object file descriptor. NULL is returned if invalid.
*/
-rtems_rtl_obj_t* rtems_rtl_check_handle (void* handle);
+rtems_rtl_obj* rtems_rtl_check_handle (void* handle);
/**
* Find the object given a file name.
*
* @param name The name of the object file.
* @retval NULL No object file with that name found.
- * @return rtems_rtl_obj_t* The object file descriptor.
+ * @return rtems_rtl_obj* The object file descriptor.
*/
-rtems_rtl_obj_t* rtems_rtl_find_obj (const char* name);
+rtems_rtl_obj* rtems_rtl_find_obj (const char* name);
/**
* Load an object file into memory relocating it. It will not be resolved
@@ -237,7 +237,7 @@ rtems_rtl_obj_t* rtems_rtl_find_obj (const char* name);
* @param mode The mode of the load as defined by the dlopen call.
* @return rtl_obj* The object file descriptor. NULL is returned if the load fails.
*/
-rtems_rtl_obj_t* rtems_rtl_load_object (const char* name, int mode);
+rtems_rtl_obj* rtems_rtl_load_object (const char* name, int mode);
/**
* Unload an object file. This only happens when the user count is 0.
@@ -248,7 +248,7 @@ rtems_rtl_obj_t* rtems_rtl_load_object (const char* name, int mode);
* @retval true The object file has been unloaded.
* @retval false The object file could not be unloaded.
*/
-bool rtems_rtl_unload_object (rtems_rtl_obj_t* obj);
+bool rtems_rtl_unload_object (rtems_rtl_obj* obj);
/**
* Run any constructor functions the object file may contain. This call
@@ -256,7 +256,7 @@ bool rtems_rtl_unload_object (rtems_rtl_obj_t* obj);
*
* @param obj The object file.
*/
-void rtems_rtl_run_ctors (rtems_rtl_obj_t* obj);
+void rtems_rtl_run_ctors (rtems_rtl_obj* obj);
/**
* Get the last error message clearing it. This operation locks the run time
@@ -309,7 +309,7 @@ void rtems_rtl_base_sym_global_add (const unsigned char* esyms,
* @return rtl_obj* The object file descriptor for the base image. NULL is
* returned if the load fails.
*/
-rtems_rtl_obj_t* rtems_rtl_baseimage (void);
+rtems_rtl_obj* rtems_rtl_baseimage (void);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/dlfcn-shell.c b/cpukit/libdl/dlfcn-shell.c
index 3746711ef1..539774d6dd 100644
--- a/cpukit/libdl/dlfcn-shell.c
+++ b/cpukit/libdl/dlfcn-shell.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -98,7 +98,7 @@ shell_dlsym (int argc, char* argv[])
return -1;
}
-typedef int (*call_t)(int argc, char* argv[]);
+typedef int (*call_p)(int argc, char* argv[]);
int
shell_dlcall (int argc, char* argv[])
@@ -106,7 +106,7 @@ shell_dlcall (int argc, char* argv[])
void* value;
if (lookup_dlsym (&value, argc, argv))
{
- call_t call = value;
+ call_p call = value;
int r;
printf ("(*%p)(%d, ....)\n", value, argc - 3);
r = call (argc - 3, argv + 3);
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 3b31bb2e8e..1d7164539b 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -19,10 +19,10 @@
#include <dlfcn.h>
#include <rtems/rtl/rtl.h>
-static rtems_rtl_obj_t*
+static rtems_rtl_obj*
dl_get_obj_from_handle (void* handle)
{
- rtems_rtl_obj_t* obj;
+ rtems_rtl_obj* obj;
/*
* Handle the special cases provided in NetBSD and Sun documentation.
@@ -43,7 +43,7 @@ dl_get_obj_from_handle (void* handle)
void*
dlopen (const char* name, int mode)
{
- rtems_rtl_obj_t* obj = NULL;
+ rtems_rtl_obj* obj = NULL;
if (!rtems_rtl_lock ())
return NULL;
@@ -67,8 +67,8 @@ dlopen (const char* name, int mode)
int
dlclose (void* handle)
{
- rtems_rtl_obj_t* obj;
- int r;
+ rtems_rtl_obj* obj;
+ int r;
if (!rtems_rtl_lock ())
return -1;
@@ -96,9 +96,9 @@ dlclose (void* handle)
void*
dlsym (void* handle, const char *symbol)
{
- rtems_rtl_obj_t* obj;
- rtems_rtl_obj_sym_t* sym = NULL;
- void* symval = NULL;
+ rtems_rtl_obj* obj;
+ rtems_rtl_obj_sym* sym = NULL;
+ void* symval = NULL;
if (!rtems_rtl_lock ())
return NULL;
@@ -136,8 +136,8 @@ dlerror (void)
int
dlinfo (void* handle, int request, void* p)
{
- rtems_rtl_obj_t* obj;
- int rc = -1;
+ rtems_rtl_obj* obj;
+ int rc = -1;
if (!rtems_rtl_lock () || !p)
return -1;
diff --git a/cpukit/libdl/rap.c b/cpukit/libdl/rap.c
index bb42072b21..ff945314ce 100644
--- a/cpukit/libdl/rap.c
+++ b/cpukit/libdl/rap.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -44,18 +44,18 @@ typedef struct rtems_rap_data_s
rtems_chain_control apps; /**< List if loaded application. */
int last_errno; /**< Last error number. */
char last_error[64]; /**< Last error string. */
-} rtems_rap_data_t;
+} rtems_rap_data;
/**
* The RAP file data. This structure is allocated on the heap when a file is
* loaded.
*/
-typedef struct rtems_rap_app_s
+typedef struct rtems_rap_app
{
rtems_chain_node node; /**< The node's link in the chain. */
const char* name; /**< The file name */
void* handle; /**< The dlopen handle. */
-} rtems_rap_app_t;
+} rtems_rap_app;
/**
* RTL entry.
@@ -69,7 +69,7 @@ typedef struct rtems_rap_app_s
/**
* Static RAP data is returned to the user when the loader is locked.
*/
-static rtems_rap_data_t rap_ = { .once = PTHREAD_ONCE_INIT };
+static rtems_rap_data rap_ = { .once = PTHREAD_ONCE_INIT };
/**
* Verbose level for the RAP loader.
@@ -79,7 +79,7 @@ static bool rap_verbose;
/**
* RAP entry call signature.
*/
-typedef int (*rtems_rap_entry_t)(int argc, const char* argv[]);
+typedef int (*rtems_rap_entry)(int argc, const char* argv[]);
/**
* Forward decl.
@@ -100,7 +100,7 @@ rtems_rap_data_init (void)
rtems_chain_initialize_empty (&rap_.apps);
}
-static rtems_rap_data_t*
+static rtems_rap_data*
rtems_rap_lock (void)
{
pthread_once (&rap_.once, rtems_rap_data_init);
@@ -115,10 +115,10 @@ rtems_rap_unlock (void)
rtems_mutex_unlock (&rap_.lock);
}
-static rtems_rap_app_t*
+static rtems_rap_app*
rtems_rap_check_handle (void* handle)
{
- rtems_rap_app_t* app;
+ rtems_rap_app* app;
rtems_chain_node* node;
app = handle;
@@ -126,7 +126,7 @@ rtems_rap_check_handle (void* handle)
while (!rtems_chain_is_tail (&rap_.apps, node))
{
- rtems_rap_app_t* check = (rtems_rap_app_t*) node;
+ rtems_rap_app* check = (rtems_rap_app*) node;
if (check == app)
return app;
node = rtems_chain_next (node);
@@ -135,17 +135,17 @@ rtems_rap_check_handle (void* handle)
return NULL;
}
-static rtems_rap_app_t*
+static rtems_rap_app*
rtems_rap_app_alloc (void)
{
- rtems_rap_app_t* app = malloc (sizeof (rtems_rap_app_t));
- memset (app, 0, sizeof (rtems_rap_app_t));
+ rtems_rap_app* app = malloc (sizeof (rtems_rap_app));
+ memset (app, 0, sizeof (rtems_rap_app));
rtems_chain_append (&rap_.apps, &app->node);
return app;
}
static void
-rtems_rap_app_free (rtems_rap_app_t* app)
+rtems_rap_app_free (rtems_rap_app* app)
{
if (app->handle)
{
@@ -158,7 +158,7 @@ rtems_rap_app_free (rtems_rap_app_t* app)
}
static bool
-rtems_rap_match_name (rtems_rap_app_t* app, const char* name)
+rtems_rap_match_name (rtems_rap_app* app, const char* name)
{
const char* a;
@@ -211,8 +211,8 @@ rtems_rap_get_rtl_error (void)
static void
rtems_rap_set_error (int error, const char* format, ...)
{
- rtems_rap_data_t* rap = rtems_rap_lock ();
- va_list ap;
+ rtems_rap_data* rap = rtems_rap_lock ();
+ va_list ap;
va_start (ap, format);
rap->last_errno = error;
vsnprintf (rap->last_error, sizeof (rap->last_error), format, ap);
@@ -223,7 +223,7 @@ rtems_rap_set_error (int error, const char* format, ...)
bool
rtems_rap_load (const char* name, int mode, int argc, const char* argv[])
{
- rtems_rap_data_t* rap = rtems_rap_lock ();
+ rtems_rap_data* rap = rtems_rap_lock ();
if (!rap)
return false;
@@ -236,11 +236,11 @@ rtems_rap_load (const char* name, int mode, int argc, const char* argv[])
*/
if (!rtems_rap_find (name))
{
- rtems_rap_app_t* app;
- rtems_rap_entry_t init;
- rtems_rap_entry_t fini;
- size_t size = 0;
- int r;
+ rtems_rap_app* app;
+ rtems_rap_entry init;
+ rtems_rap_entry fini;
+ size_t size = 0;
+ int r;
/*
* Allocate a new application descriptor and attempt to load it.
@@ -309,9 +309,9 @@ rtems_rap_load (const char* name, int mode, int argc, const char* argv[])
bool
rtems_rap_unload (const char* name)
{
- rtems_rap_app_t* app;
- rtems_rap_entry_t fini;
- int r;
+ rtems_rap_app* app;
+ rtems_rap_entry fini;
+ int r;
rtems_rap_lock ();
@@ -352,14 +352,14 @@ rtems_rap_unload (const char* name)
void*
rtems_rap_find (const char* name)
{
- rtems_rap_data_t* rap = rtems_rap_lock ();
+ rtems_rap_data* rap = rtems_rap_lock ();
rtems_chain_node* node;
node = rtems_chain_first (&rap->apps);
while (!rtems_chain_is_tail (&rap->apps, node))
{
- rtems_rap_app_t* app = (rtems_rap_app_t*) node;
+ rtems_rap_app* app = (rtems_rap_app*) node;
if (rtems_rap_match_name (app, name))
{
rtems_rap_unlock ();
@@ -374,9 +374,9 @@ rtems_rap_find (const char* name)
}
bool
-rtems_rap_iterate (rtems_rap_iterator_t iterator)
+rtems_rap_iterate (rtems_rap_iterator iterator)
{
- rtems_rap_data_t* rap = rtems_rap_lock ();
+ rtems_rap_data* rap = rtems_rap_lock ();
rtems_chain_node* node;
bool result = true;
@@ -384,7 +384,7 @@ rtems_rap_iterate (rtems_rap_iterator_t iterator)
while (!rtems_chain_is_tail (&rap->apps, node))
{
- rtems_rap_app_t* app = (rtems_rap_app_t*) node;
+ rtems_rap_app* app = (rtems_rap_app*) node;
result = iterator (app);
if (!result)
break;
@@ -399,7 +399,7 @@ rtems_rap_iterate (rtems_rap_iterator_t iterator)
const char*
rtems_rap_name (void* handle)
{
- rtems_rap_app_t* app = rtems_rap_check_handle (handle);
+ rtems_rap_app* app = rtems_rap_check_handle (handle);
if (app)
return app->name;
return NULL;
@@ -408,7 +408,7 @@ rtems_rap_name (void* handle)
void*
rtems_rap_dl_handle (void* handle)
{
- rtems_rap_app_t* app = rtems_rap_check_handle (handle);
+ rtems_rap_app* app = rtems_rap_check_handle (handle);
if (app)
return app->handle;
return NULL;
@@ -417,8 +417,8 @@ rtems_rap_dl_handle (void* handle)
int
rtems_rap_get_error (char* message, size_t max_message)
{
- rtems_rap_data_t* rap = rtems_rap_lock ();
- int last_errno = rap->last_errno;
+ rtems_rap_data* rap = rtems_rap_lock ();
+ int last_errno = rap->last_errno;
strlcpy (message, rap->last_error, max_message);
rtems_rap_unlock ();
return last_errno;
diff --git a/cpukit/libdl/rtl-alloc-heap.c b/cpukit/libdl/rtl-alloc-heap.c
index 44a4816c5d..2483e89fed 100644
--- a/cpukit/libdl/rtl-alloc-heap.c
+++ b/cpukit/libdl/rtl-alloc-heap.c
@@ -18,10 +18,10 @@
#include "rtl-alloc-heap.h"
void
-rtems_rtl_alloc_heap (bool allocate,
- rtems_rtl_alloc_tag_t tag,
- void** address,
- size_t size)
+rtems_rtl_alloc_heap (bool allocate,
+ rtems_rtl_alloc_tag tag,
+ void** address,
+ size_t size)
{
if (allocate)
*address = malloc (size);
diff --git a/cpukit/libdl/rtl-alloc-heap.h b/cpukit/libdl/rtl-alloc-heap.h
index d9276553e4..befcad19b0 100644
--- a/cpukit/libdl/rtl-alloc-heap.h
+++ b/cpukit/libdl/rtl-alloc-heap.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -35,10 +35,10 @@ extern "C" {
* @param size The size of the allocation if an allocation request and
* not used if deleting or freeing a previous allocation.
*/
-void rtems_rtl_alloc_heap(bool allocate,
- rtems_rtl_alloc_tag_t tag,
- void** address,
- size_t size);
+void rtems_rtl_alloc_heap(bool allocate,
+ rtems_rtl_alloc_tag tag,
+ void** address,
+ size_t size);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/rtl-allocator.c b/cpukit/libdl/rtl-allocator.c
index 575ce5356e..605cdbde83 100644
--- a/cpukit/libdl/rtl-allocator.c
+++ b/cpukit/libdl/rtl-allocator.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -39,7 +39,7 @@ static const char* tag_labels[6] =
#endif
void
-rtems_rtl_alloc_initialise (rtems_rtl_alloc_data_t* data)
+rtems_rtl_alloc_initialise (rtems_rtl_alloc_data* data)
{
int c;
data->allocator = rtems_rtl_alloc_heap;
@@ -48,10 +48,10 @@ rtems_rtl_alloc_initialise (rtems_rtl_alloc_data_t* data)
}
void*
-rtems_rtl_alloc_new (rtems_rtl_alloc_tag_t tag, size_t size, bool zero)
+rtems_rtl_alloc_new (rtems_rtl_alloc_tag tag, size_t size, bool zero)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
- void* address = NULL;
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
+ void* address = NULL;
/*
* Obtain memory from the allocator. The address field is set by the
@@ -76,9 +76,9 @@ rtems_rtl_alloc_new (rtems_rtl_alloc_tag_t tag, size_t size, bool zero)
}
void
-rtems_rtl_alloc_del (rtems_rtl_alloc_tag_t tag, void* address)
+rtems_rtl_alloc_del (rtems_rtl_alloc_tag tag, void* address)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
if (rtems_rtl_trace (RTEMS_RTL_TRACE_ALLOCATOR))
printf ("rtl: alloc: del: %s addr=%p\n",
@@ -90,22 +90,22 @@ rtems_rtl_alloc_del (rtems_rtl_alloc_tag_t tag, void* address)
rtems_rtl_unlock ();
}
-rtems_rtl_allocator_t
-rtems_rtl_alloc_hook (rtems_rtl_allocator_t handler)
+rtems_rtl_allocator
+rtems_rtl_alloc_hook (rtems_rtl_allocator handler)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
- rtems_rtl_allocator_t previous = rtl->allocator.allocator;
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
+ rtems_rtl_allocator previous = rtl->allocator.allocator;
rtl->allocator.allocator = handler;
rtems_rtl_unlock ();
return previous;
}
void
-rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag_t tag,
- rtems_rtl_ptr_t* handle,
- size_t size)
+rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag tag,
+ rtems_rtl_ptr* handle,
+ size_t size)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
if (rtems_rtl_trace (RTEMS_RTL_TRACE_ALLOCATOR))
{
@@ -118,7 +118,7 @@ rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag_t tag,
if (rtl)
{
- rtems_rtl_alloc_data_t* allocator = &rtl->allocator;
+ rtems_rtl_alloc_data* allocator = &rtl->allocator;
handle->pointer = rtems_rtl_alloc_new (tag, size, false);
if (!rtems_rtl_ptr_null (handle))
rtems_chain_append_unprotected (&allocator->indirects[tag],
@@ -129,10 +129,10 @@ rtems_rtl_alloc_indirect_new (rtems_rtl_alloc_tag_t tag,
}
void
-rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag_t tag,
- rtems_rtl_ptr_t* handle)
+rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag tag,
+ rtems_rtl_ptr* handle)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
if (rtems_rtl_trace (RTEMS_RTL_TRACE_ALLOCATOR))
{
diff --git a/cpukit/libdl/rtl-debugger.c b/cpukit/libdl/rtl-debugger.c
index 1ba826f669..92ab98e3c5 100644
--- a/cpukit/libdl/rtl-debugger.c
+++ b/cpukit/libdl/rtl-debugger.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -43,7 +43,7 @@ _rtld_debug_state (void)
}
int
-_rtld_linkmap_add (rtems_rtl_obj_t* obj)
+_rtld_linkmap_add (rtems_rtl_obj* obj)
{
struct link_map* l = obj->linkmap;
struct link_map* prev;
@@ -76,7 +76,7 @@ _rtld_linkmap_add (rtems_rtl_obj_t* obj)
}
void
-_rtld_linkmap_delete (rtems_rtl_obj_t* obj)
+_rtld_linkmap_delete (rtems_rtl_obj* obj)
{
struct link_map* l = obj->linkmap;
/*
diff --git a/cpukit/libdl/rtl-elf.c b/cpukit/libdl/rtl-elf.c
index 47c92d5f39..53f43aaeac 100644
--- a/cpukit/libdl/rtl-elf.c
+++ b/cpukit/libdl/rtl-elf.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012-2014 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -43,7 +43,7 @@
/**
* The ELF format signature.
*/
-static rtems_rtl_loader_format_t elf_sig =
+static rtems_rtl_loader_format elf_sig =
{
.label = "ELF",
.flags = RTEMS_RTL_FMT_ELF
@@ -65,19 +65,19 @@ rtems_rtl_elf_machine_check (Elf_Ehdr* ehdr)
}
bool
-rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj,
- const Elf_Sym* sym,
- const char* symname,
- Elf_Word* value)
+rtems_rtl_elf_find_symbol (rtems_rtl_obj* obj,
+ const Elf_Sym* sym,
+ const char* symname,
+ Elf_Word* value)
{
- rtems_rtl_obj_sect_t* sect;
+ rtems_rtl_obj_sect* sect;
if (ELF_ST_TYPE(sym->st_info) == STT_NOTYPE)
{
/*
* Search the object file then the global table for the symbol.
*/
- rtems_rtl_obj_sym_t* symbol = rtems_rtl_symbol_obj_find (obj, symname);
+ rtems_rtl_obj_sym* symbol = rtems_rtl_symbol_obj_find (obj, symname);
if (!symbol)
{
rtems_rtl_set_error (EINVAL, "global symbol not found: %s", symname);
@@ -100,20 +100,20 @@ rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj,
}
static bool
-rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_t* sect,
- void* data)
+rtems_rtl_elf_relocator (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect* sect,
+ void* data)
{
- rtems_rtl_obj_cache_t* symbols;
- rtems_rtl_obj_cache_t* strings;
- rtems_rtl_obj_cache_t* relocs;
- rtems_rtl_obj_sect_t* targetsect;
- rtems_rtl_obj_sect_t* symsect;
- rtems_rtl_obj_sect_t* strtab;
- bool is_rela;
- size_t reloc_size;
- int reloc;
+ rtems_rtl_obj_cache* symbols;
+ rtems_rtl_obj_cache* strings;
+ rtems_rtl_obj_cache* relocs;
+ rtems_rtl_obj_sect* targetsect;
+ rtems_rtl_obj_sect* symsect;
+ rtems_rtl_obj_sect* strtab;
+ bool is_rela;
+ size_t reloc_size;
+ int reloc;
/*
* First check if the section the relocations are for exists. If it does not
@@ -215,8 +215,8 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
{
if (!rtems_rtl_elf_find_symbol (obj, &sym, symname, &symvalue))
{
- uint16_t flags = 0;
- rtems_rtl_word_t rel_words[3];
+ uint16_t flags = 0;
+ rtems_rtl_word rel_words[3];
relocate = false;
@@ -282,12 +282,12 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
- rtems_rtl_obj_sym_t* sym)
+rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc* reloc,
+ rtems_rtl_obj_sym* sym)
{
- rtems_rtl_obj_sect_t* sect;
- bool is_rela;
- Elf_Word symvalue;
+ rtems_rtl_obj_sect* sect;
+ bool is_rela;
+ Elf_Word symvalue;
is_rela =reloc->flags & 1;
@@ -338,23 +338,23 @@ rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
}
static bool
-rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_t* sect,
- void* data)
+rtems_rtl_elf_symbols (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect* sect,
+ void* data)
{
- rtems_rtl_obj_cache_t* symbols;
- rtems_rtl_obj_cache_t* strings;
- rtems_rtl_obj_sect_t* strtab;
- int locals;
- int local_string_space;
- rtems_rtl_obj_sym_t* lsym;
- char* lstring;
- int globals;
- int global_string_space;
- rtems_rtl_obj_sym_t* gsym;
- char* gstring;
- int sym;
+ rtems_rtl_obj_cache* symbols;
+ rtems_rtl_obj_cache* strings;
+ rtems_rtl_obj_sect* strtab;
+ int locals;
+ int local_string_space;
+ rtems_rtl_obj_sym* lsym;
+ char* lstring;
+ int globals;
+ int global_string_space;
+ rtems_rtl_obj_sym* gsym;
+ char* gstring;
+ int sym;
strtab = rtems_rtl_obj_find_section (obj, ".strtab");
if (!strtab)
@@ -408,7 +408,7 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
(ELF_ST_TYPE (symbol.st_info) == STT_FUNC) ||
(ELF_ST_TYPE (symbol.st_info) == STT_NOTYPE)))
{
- rtems_rtl_obj_sect_t* symsect;
+ rtems_rtl_obj_sect* symsect;
symsect = rtems_rtl_obj_find_section_by_index (obj, symbol.st_shndx);
if (symsect)
@@ -446,7 +446,7 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
if (locals)
{
- obj->local_size = locals * sizeof (rtems_rtl_obj_sym_t) + local_string_space;
+ obj->local_size = locals * sizeof (rtems_rtl_obj_sym) + local_string_space;
obj->local_table = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_SYMBOL,
obj->local_size, true);
if (!obj->local_table)
@@ -461,7 +461,7 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
if (globals)
{
- obj->global_size = globals * sizeof (rtems_rtl_obj_sym_t) + global_string_space;
+ obj->global_size = globals * sizeof (rtems_rtl_obj_sym) + global_string_space;
obj->global_table = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_SYMBOL,
obj->global_size, true);
if (!obj->global_table)
@@ -482,10 +482,10 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
lsym = obj->local_table;
lstring =
- (((char*) obj->local_table) + (locals * sizeof (rtems_rtl_obj_sym_t)));
+ (((char*) obj->local_table) + (locals * sizeof (rtems_rtl_obj_sym)));
gsym = obj->global_table;
gstring =
- (((char*) obj->global_table) + (globals * sizeof (rtems_rtl_obj_sym_t)));
+ (((char*) obj->global_table) + (globals * sizeof (rtems_rtl_obj_sym)));
for (sym = 0; sym < (sect->size / sizeof (Elf_Sym)); ++sym)
{
@@ -530,9 +530,9 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
(ELF_ST_BIND (symbol.st_info) == STB_WEAK) ||
(ELF_ST_BIND (symbol.st_info) == STB_LOCAL)))
{
- rtems_rtl_obj_sect_t* symsect;
- rtems_rtl_obj_sym_t* osym;
- char* string;
+ rtems_rtl_obj_sect* symsect;
+ rtems_rtl_obj_sym* osym;
+ char* string;
symsect = rtems_rtl_obj_find_section_by_index (obj, symbol.st_shndx);
if (symsect)
@@ -578,10 +578,10 @@ rtems_rtl_elf_symbols (rtems_rtl_obj_t* obj,
}
static bool
-rtems_rtl_elf_loader (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_t* sect,
- void* data)
+rtems_rtl_elf_loader (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect* sect,
+ void* data)
{
uint8_t* base_offset;
size_t len;
@@ -611,14 +611,14 @@ rtems_rtl_elf_loader (rtems_rtl_obj_t* obj,
}
static bool
-rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
+rtems_rtl_elf_parse_sections (rtems_rtl_obj* obj, int fd, Elf_Ehdr* ehdr)
{
- rtems_rtl_obj_cache_t* sects;
- rtems_rtl_obj_cache_t* strings;
- int section;
- off_t sectstroff;
- off_t off;
- Elf_Shdr shdr;
+ rtems_rtl_obj_cache* sects;
+ rtems_rtl_obj_cache* strings;
+ int section;
+ off_t sectstroff;
+ off_t off;
+ Elf_Shdr shdr;
rtems_rtl_obj_caches (§s, &strings, NULL);
@@ -772,10 +772,10 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
}
bool
-rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_elf_file_check (rtems_rtl_obj* obj, int fd)
{
- rtems_rtl_obj_cache_t* header;
- Elf_Ehdr ehdr;
+ rtems_rtl_obj_cache* header;
+ Elf_Ehdr ehdr;
rtems_rtl_obj_caches (&header, NULL, NULL);
@@ -803,7 +803,7 @@ rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd)
}
static bool
-rtems_rtl_elf_load_linkmap (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_load_linkmap (rtems_rtl_obj* obj)
{
rtems_chain_control* sections = NULL;
rtems_chain_node* node = NULL;
@@ -824,7 +824,7 @@ rtems_rtl_elf_load_linkmap (rtems_rtl_obj_t* obj)
node = rtems_chain_first (sections);
while (!rtems_chain_is_tail (sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->size != 0) && ((sect->flags & mask) != 0))
{
++sec_num;
@@ -867,7 +867,7 @@ rtems_rtl_elf_load_linkmap (rtems_rtl_obj_t* obj)
node = rtems_chain_first (sections);
while (!rtems_chain_is_tail (sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->size != 0) && ((sect->flags & mask) != 0))
{
@@ -904,10 +904,10 @@ rtems_rtl_elf_load_linkmap (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_elf_file_load (rtems_rtl_obj* obj, int fd)
{
- rtems_rtl_obj_cache_t* header;
- Elf_Ehdr ehdr;
+ rtems_rtl_obj_cache* header;
+ Elf_Ehdr ehdr;
rtems_rtl_obj_caches (&header, NULL, NULL);
@@ -994,13 +994,13 @@ rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd)
}
bool
-rtems_rtl_elf_file_unload (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_file_unload (rtems_rtl_obj* obj)
{
rtems_rtl_elf_unwind_deregister (obj);
return true;
}
-rtems_rtl_loader_format_t*
+rtems_rtl_loader_format*
rtems_rtl_elf_file_sig (void)
{
return &elf_sig;
diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h
index abe0889fae..5d560a0b34 100644
--- a/cpukit/libdl/rtl-elf.h
+++ b/cpukit/libdl/rtl-elf.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -67,8 +67,8 @@ extern "C" {
* @retval 0 Unknown or unsupported flags.
* @retval uint32_t RTL object file flags.
*/
-uint32_t rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr);
+uint32_t rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr);
/**
* Architecture specific handler to check is a relocation record's type is
@@ -94,12 +94,12 @@ bool rtems_rtl_elf_rel_resolve_sym (Elf_Word type);
* @retval bool The relocation has been applied.
* @retval bool The relocation could not be applied.
*/
-bool rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue);
+bool rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue);
/**
* Architecture specific relocation handler compiled in for a specific
@@ -115,12 +115,12 @@ bool rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
* @retval bool The relocation has been applied.
* @retval bool The relocation could not be applied.
*/
-bool rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue);
+bool rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue);
/**
* Find the symbol. The symbol is passed as an ELF type symbol with the name
@@ -139,10 +139,10 @@ bool rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
* @retval true The symbol resolved.
* @retval false The symbol could not be result. The RTL error is set.
*/
-bool rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj,
- const Elf_Sym* sym,
- const char* symname,
- Elf_Word* value);
+bool rtems_rtl_elf_find_symbol (rtems_rtl_obj* obj,
+ const Elf_Sym* sym,
+ const char* symname,
+ Elf_Word* value);
/**
* The ELF format check handler.
@@ -150,7 +150,7 @@ bool rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj,
* @param obj The object being checked.
* @param fd The file descriptor.
*/
-bool rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd);
+bool rtems_rtl_elf_file_check (rtems_rtl_obj* obj, int fd);
/**
* The ELF format load handler.
@@ -158,21 +158,21 @@ bool rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd);
* @param obj The object to load.
* @param fd The file descriptor.
*/
-bool rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd);
+bool rtems_rtl_elf_file_load (rtems_rtl_obj* obj, int fd);
/**
* The ELF format unload handler.
*
* @param obj The object to unload.
*/
-bool rtems_rtl_elf_file_unload (rtems_rtl_obj_t* obj);
+bool rtems_rtl_elf_file_unload (rtems_rtl_obj* obj);
/**
* The ELF format signature handler.
*
- * @return rtems_rtl_loader_format_t* The format's signature.
+ * @return rtems_rtl_loader_format* The format's signature.
*/
-rtems_rtl_loader_format_t* rtems_rtl_elf_file_sig (void);
+rtems_rtl_loader_format* rtems_rtl_elf_file_sig (void);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/rtl-error.c b/cpukit/libdl/rtl-error.c
index 5638b88705..7b72c0a26d 100644
--- a/cpukit/libdl/rtl-error.c
+++ b/cpukit/libdl/rtl-error.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -28,8 +28,8 @@
void
rtems_rtl_set_error (int error, const char* format, ...)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
- va_list ap;
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
+ va_list ap;
va_start (ap, format);
rtl->last_errno = error;
vsnprintf (rtl->last_error, sizeof (rtl->last_error), format, ap);
@@ -40,7 +40,7 @@ rtems_rtl_set_error (int error, const char* format, ...)
int
rtems_rtl_get_error (char* message, size_t max_message)
{
- rtems_rtl_data_t* rtl = rtems_rtl_lock ();
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
if (rtl != NULL)
{
int last_errno = rtl->last_errno;
diff --git a/cpukit/libdl/rtl-error.h b/cpukit/libdl/rtl-error.h
index 0badf51e21..576384ed5d 100644
--- a/cpukit/libdl/rtl-error.h
+++ b/cpukit/libdl/rtl-error.h
@@ -27,7 +27,7 @@ extern "C" {
#endif
/**
- * Sets the error.
+ * Sets the error.
*
* Assumes the RTL has been locked.
*
diff --git a/cpukit/libdl/rtl-mdreloc-arm.c b/cpukit/libdl/rtl-mdreloc-arm.c
index 7b47345427..96e14fc676 100644
--- a/cpukit/libdl/rtl-mdreloc-arm.c
+++ b/cpukit/libdl/rtl-mdreloc-arm.c
@@ -67,8 +67,8 @@ sign_extend31(Elf_Addr val)
}
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
uint32_t flags = 0;
if (shdr->sh_type == SHT_ARM_EXIDX)
@@ -83,24 +83,24 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rela type record not supported");
return false;
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf_Addr tmp;
@@ -357,9 +357,9 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
/*
* We location the EH sections in section flags.
@@ -368,13 +368,13 @@ rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return true;
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
obj->loader = NULL;
return true;
@@ -406,7 +406,7 @@ _Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
_Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
int* nrec)
{
- rtems_rtl_data_t* rtl;
+ rtems_rtl_data* rtl;
rtems_chain_node* node;
__EIT_entry* exidx_start = &__exidx_start;
__EIT_entry* exidx_end = &__exidx_end;
@@ -415,7 +415,7 @@ _Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
node = rtems_chain_first (&rtl->objects);
while (!rtems_chain_is_tail (&rtl->objects, node)) {
- rtems_rtl_obj_t* obj = (rtems_rtl_obj_t*) node;
+ rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
if (rtems_rtl_obj_text_inside (obj, (void*) return_address)) {
exidx_start = (__EIT_entry*) obj->eh_base;
exidx_end = (__EIT_entry*) (obj->eh_base + obj->eh_size);
diff --git a/cpukit/libdl/rtl-mdreloc-bfin.c b/cpukit/libdl/rtl-mdreloc-bfin.c
index b6542c38a6..e1190046a3 100644
--- a/cpukit/libdl/rtl-mdreloc-bfin.c
+++ b/cpukit/libdl/rtl-mdreloc-bfin.c
@@ -33,17 +33,17 @@ load_ptr(void *where)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
- Elf_Addr target = 0;
- Elf_Addr *where;
- Elf_Word tmp;
- Elf_Word size; //byte
+ Elf_Addr target = 0;
+ Elf_Addr *where;
+ Elf_Word tmp;
+ Elf_Word size; //byte
where = (Elf_Addr *)(sect->base + rela->r_offset);
@@ -112,33 +112,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rel type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-h8300.c b/cpukit/libdl/rtl-mdreloc-h8300.c
index ddc0dc160f..54af83973f 100644
--- a/cpukit/libdl/rtl-mdreloc-h8300.c
+++ b/cpukit/libdl/rtl-mdreloc-h8300.c
@@ -13,8 +13,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -26,15 +26,15 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
- Elf_Addr *where;
- Elf_Word tmp;
+ Elf_Addr *where;
+ Elf_Word tmp;
where = (Elf_Addr *)(sect->base + rela->r_offset);
@@ -98,33 +98,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rel type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-i386.c b/cpukit/libdl/rtl-mdreloc-i386.c
index c653274a90..f0aa61b8ee 100644
--- a/cpukit/libdl/rtl-mdreloc-i386.c
+++ b/cpukit/libdl/rtl-mdreloc-i386.c
@@ -19,8 +19,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -32,26 +32,26 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rela type record not supported");
return false;
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
- Elf_Addr target = 0;
+ Elf_Addr target = 0;
Elf_Addr* where;
Elf_Addr tmp;
@@ -112,21 +112,21 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-lm32.c b/cpukit/libdl/rtl-mdreloc-lm32.c
index 6175585ccd..ad59ec2e09 100644
--- a/cpukit/libdl/rtl-mdreloc-lm32.c
+++ b/cpukit/libdl/rtl-mdreloc-lm32.c
@@ -13,8 +13,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -26,12 +26,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf32_Word tmp;
@@ -117,33 +117,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rela type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-m68k.c b/cpukit/libdl/rtl-mdreloc-m68k.c
index 5df739aa5b..f42899b118 100644
--- a/cpukit/libdl/rtl-mdreloc-m68k.c
+++ b/cpukit/libdl/rtl-mdreloc-m68k.c
@@ -33,8 +33,8 @@ static inline int overflow_16_check(int value)
}
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -46,14 +46,14 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symnane,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symnane,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
- Elf_Addr target = 0;
+ Elf_Addr target = 0;
Elf_Addr* where;
Elf_Word tmp;
@@ -145,33 +145,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rel type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-mips.c b/cpukit/libdl/rtl-mdreloc-mips.c
index 360719e157..7ad18b382f 100644
--- a/cpukit/libdl/rtl-mdreloc-mips.c
+++ b/cpukit/libdl/rtl-mdreloc-mips.c
@@ -13,8 +13,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -26,12 +26,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rela type record not supported");
return false;
@@ -46,12 +46,12 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
* just consider symtype here.
*/
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf_Word tmp;
@@ -199,21 +199,21 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-moxie.c b/cpukit/libdl/rtl-mdreloc-moxie.c
index dc41a30679..68cbeeceb2 100644
--- a/cpukit/libdl/rtl-mdreloc-moxie.c
+++ b/cpukit/libdl/rtl-mdreloc-moxie.c
@@ -14,8 +14,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -27,12 +27,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf_Sword tmp;
@@ -85,33 +85,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rel type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-powerpc.c b/cpukit/libdl/rtl-mdreloc-powerpc.c
index 06854a9028..e59c415828 100644
--- a/cpukit/libdl/rtl-mdreloc-powerpc.c
+++ b/cpukit/libdl/rtl-mdreloc-powerpc.c
@@ -24,8 +24,8 @@
#define l(x) ((u_int32_t)(x) & 0xffff)
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -37,12 +37,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr* where;
Elf_Word tmp;
@@ -198,33 +198,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
printf ("rtl: rel type record not supported; please report\n");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-sparc.c b/cpukit/libdl/rtl-mdreloc-sparc.c
index e4143a91bd..6bc62d5692 100644
--- a/cpukit/libdl/rtl-mdreloc-sparc.c
+++ b/cpukit/libdl/rtl-mdreloc-sparc.c
@@ -131,8 +131,8 @@ static const int reloc_target_bitmask[] = {
#define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t])
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -144,12 +144,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf_Word type, value, mask;
@@ -260,33 +260,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
printf ("rtl: rel type record not supported; please report\n");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-mdreloc-v850.c b/cpukit/libdl/rtl-mdreloc-v850.c
index f00c07febb..cc2a1fa10e 100644
--- a/cpukit/libdl/rtl-mdreloc-v850.c
+++ b/cpukit/libdl/rtl-mdreloc-v850.c
@@ -14,8 +14,8 @@
#include "rtl-unwind-dw2.h"
uint32_t
-rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
- const Elf_Shdr* shdr)
+rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj,
+ const Elf_Shdr* shdr)
{
return 0;
}
@@ -27,12 +27,12 @@ rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
}
bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rela (const rtems_rtl_obj* obj,
+ const Elf_Rela* rela,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
Elf_Addr *where;
Elf_Word tmp;
@@ -94,33 +94,33 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
+rtems_rtl_elf_relocate_rel (const rtems_rtl_obj* obj,
+ const Elf_Rel* rel,
+ const rtems_rtl_obj_sect* sect,
+ const char* symname,
+ const Elf_Byte syminfo,
+ const Elf_Word symvalue)
{
rtems_rtl_set_error (EINVAL, "rel type record not supported");
return false;
}
bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
}
bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_register (obj);
}
bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
{
return rtems_rtl_elf_unwind_dw2_deregister (obj);
}
diff --git a/cpukit/libdl/rtl-obj-cache.c b/cpukit/libdl/rtl-obj-cache.c
index 00a2417f45..06ef8db384 100644
--- a/cpukit/libdl/rtl-obj-cache.c
+++ b/cpukit/libdl/rtl-obj-cache.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -31,7 +31,7 @@
#include <rtems/rtl/rtl-trace.h>
bool
-rtems_rtl_obj_cache_open (rtems_rtl_obj_cache_t* cache, size_t size)
+rtems_rtl_obj_cache_open (rtems_rtl_obj_cache* cache, size_t size)
{
cache->fd = -1;
cache->file_size = 0;
@@ -48,7 +48,7 @@ rtems_rtl_obj_cache_open (rtems_rtl_obj_cache_t* cache, size_t size)
}
void
-rtems_rtl_obj_cache_close (rtems_rtl_obj_cache_t* cache)
+rtems_rtl_obj_cache_close (rtems_rtl_obj_cache* cache)
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_CACHE))
printf ("rtl: cache: %2d: close\n", cache->fd);
@@ -60,7 +60,7 @@ rtems_rtl_obj_cache_close (rtems_rtl_obj_cache_t* cache)
}
void
-rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache_t* cache)
+rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache* cache)
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_CACHE))
printf ("rtl: cache: %2d: flush\n", cache->fd);
@@ -71,11 +71,11 @@ rtems_rtl_obj_cache_flush (rtems_rtl_obj_cache_t* cache)
}
bool
-rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
- int fd,
- off_t offset,
- void** buffer,
- size_t* length)
+rtems_rtl_obj_cache_read (rtems_rtl_obj_cache* cache,
+ int fd,
+ off_t offset,
+ void** buffer,
+ size_t* length)
{
struct stat sb;
@@ -238,11 +238,11 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
}
bool
-rtems_rtl_obj_cache_read_byval (rtems_rtl_obj_cache_t* cache,
- int fd,
- off_t offset,
- void* buffer,
- size_t length)
+rtems_rtl_obj_cache_read_byval (rtems_rtl_obj_cache* cache,
+ int fd,
+ off_t offset,
+ void* buffer,
+ size_t length)
{
void* cbuffer = 0;
size_t len = length;
diff --git a/cpukit/libdl/rtl-obj-comp.c b/cpukit/libdl/rtl-obj-comp.c
index c49f614368..bf9a2fc45f 100644
--- a/cpukit/libdl/rtl-obj-comp.c
+++ b/cpukit/libdl/rtl-obj-comp.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -31,8 +31,8 @@
#include <stdio.h>
bool
-rtems_rtl_obj_comp_open (rtems_rtl_obj_comp_t* comp,
- size_t size)
+rtems_rtl_obj_comp_open (rtems_rtl_obj_comp* comp,
+ size_t size)
{
comp->cache = NULL;
comp->fd = -1;
@@ -51,7 +51,7 @@ rtems_rtl_obj_comp_open (rtems_rtl_obj_comp_t* comp,
}
void
-rtems_rtl_obj_comp_close (rtems_rtl_obj_comp_t* comp)
+rtems_rtl_obj_comp_close (rtems_rtl_obj_comp* comp)
{
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, comp->buffer);
comp->cache = NULL;
@@ -64,11 +64,11 @@ rtems_rtl_obj_comp_close (rtems_rtl_obj_comp_t* comp)
}
void
-rtems_rtl_obj_comp_set (rtems_rtl_obj_comp_t* comp,
- rtems_rtl_obj_cache_t* cache,
- int fd,
- int compression,
- off_t offset)
+rtems_rtl_obj_comp_set (rtems_rtl_obj_comp* comp,
+ rtems_rtl_obj_cache* cache,
+ int fd,
+ int compression,
+ off_t offset)
{
comp->cache = cache;
comp->fd = fd;
@@ -79,9 +79,9 @@ rtems_rtl_obj_comp_set (rtems_rtl_obj_comp_t* comp,
}
bool
-rtems_rtl_obj_comp_read (rtems_rtl_obj_comp_t* comp,
- void* buffer,
- size_t length)
+rtems_rtl_obj_comp_read (rtems_rtl_obj_comp* comp,
+ void* buffer,
+ size_t length)
{
uint8_t* bin = buffer;
diff --git a/cpukit/libdl/rtl-obj.c b/cpukit/libdl/rtl-obj.c
index dd9a1cdcdc..5c2213e611 100644
--- a/cpukit/libdl/rtl-obj.c
+++ b/cpukit/libdl/rtl-obj.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -51,7 +51,7 @@
* The table of supported loader formats.
*/
#define RTEMS_RTL_LOADERS (RTEMS_RTL_ELF_LOADER_COUNT + RTEMS_RTL_RAP_LOADER_COUNT)
-static const rtems_rtl_loader_table_t loaders[RTEMS_RTL_LOADERS] =
+static const rtems_rtl_loader_table loaders[RTEMS_RTL_LOADERS] =
{
#if RTEMS_RTL_RAP_LOADER
{ .check = rtems_rtl_rap_file_check,
@@ -68,12 +68,12 @@ static const rtems_rtl_loader_table_t loaders[RTEMS_RTL_LOADERS] =
#endif
};
-rtems_rtl_obj_t*
+rtems_rtl_obj*
rtems_rtl_obj_alloc (void)
{
- rtems_rtl_obj_t* obj = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
- sizeof (rtems_rtl_obj_t),
- true);
+ rtems_rtl_obj* obj = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
+ sizeof (rtems_rtl_obj),
+ true);
if (obj)
{
/*
@@ -89,7 +89,7 @@ rtems_rtl_obj_alloc (void)
}
static void
-rtems_rtl_obj_free_names (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_free_names (rtems_rtl_obj* obj)
{
if (rtems_rtl_obj_oname_valid (obj))
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, (void*) obj->oname);
@@ -100,7 +100,7 @@ rtems_rtl_obj_free_names (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_obj_free (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_free (rtems_rtl_obj* obj)
{
if (obj->users || ((obj->flags & RTEMS_RTL_OBJ_LOCKED) != 0))
{
@@ -122,7 +122,7 @@ rtems_rtl_obj_free (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_obj_unresolved (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_unresolved (rtems_rtl_obj* obj)
{
return (obj->flags & RTEMS_RTL_OBJ_UNRESOLVED) != 0 ? true : false;
}
@@ -208,7 +208,7 @@ rtems_rtl_parse_name (const char* name,
}
static bool
-rtems_rtl_obj_parse_name (rtems_rtl_obj_t* obj, const char* name)
+rtems_rtl_obj_parse_name (rtems_rtl_obj* obj, const char* name)
{
return rtems_rtl_parse_name (name, &(obj->aname), &(obj->oname), &(obj->ooffset));
}
@@ -262,13 +262,13 @@ typedef struct
{
uint32_t mask; /**< The selection mask to sum. */
size_t size; /**< The size of all section fragments. */
-} rtems_rtl_obj_sect_summer_t;
+} rtems_rtl_obj_sect_summer_data;
static bool
rtems_rtl_obj_sect_summer (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_rtl_obj_sect_summer_t* summer = data;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_rtl_obj_sect_summer_data* summer = data;
if ((sect->flags & summer->mask) == summer->mask)
summer->size =
rtems_rtl_sect_align (summer->size, sect->alignment) + sect->size;
@@ -276,9 +276,9 @@ rtems_rtl_obj_sect_summer (rtems_chain_node* node, void* data)
}
static size_t
-rtems_rtl_obj_section_size (const rtems_rtl_obj_t* obj, uint32_t mask)
+rtems_rtl_obj_section_size (const rtems_rtl_obj* obj, uint32_t mask)
{
- rtems_rtl_obj_sect_summer_t summer;
+ rtems_rtl_obj_sect_summer_data summer;
summer.mask = mask;
summer.size = 0;
rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
@@ -295,7 +295,7 @@ typedef struct
{
uint32_t mask; /**< The selection mask to look for alignment. */
uint32_t alignment; /**< The alignment of the section type. */
-} rtems_rtl_obj_sect_aligner_t;
+} rtems_rtl_obj_sect_aligner_data;
/**
* The section aligner iterator.
@@ -303,8 +303,8 @@ typedef struct
static bool
rtems_rtl_obj_sect_aligner (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_rtl_obj_sect_aligner_t* aligner = data;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_rtl_obj_sect_aligner_data* aligner = data;
if ((sect->flags & aligner->mask) == aligner->mask)
{
aligner->alignment = sect->alignment;
@@ -314,9 +314,9 @@ rtems_rtl_obj_sect_aligner (rtems_chain_node* node, void* data)
}
static size_t
-rtems_rtl_obj_section_alignment (const rtems_rtl_obj_t* obj, uint32_t mask)
+rtems_rtl_obj_section_alignment (const rtems_rtl_obj* obj, uint32_t mask)
{
- rtems_rtl_obj_sect_aligner_t aligner;
+ rtems_rtl_obj_sect_aligner_data aligner;
aligner.mask = mask;
aligner.alignment = 0;
rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
@@ -326,16 +326,16 @@ rtems_rtl_obj_section_alignment (const rtems_rtl_obj_t* obj, uint32_t mask)
}
static bool
-rtems_rtl_obj_section_handler (uint32_t mask,
- rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data)
+rtems_rtl_obj_section_handler (uint32_t mask,
+ rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data)
{
rtems_chain_node* node = rtems_chain_first (&obj->sections);
while (!rtems_chain_is_tail (&obj->sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->flags & mask) != 0)
{
if (!handler (obj, fd, sect, data))
@@ -347,7 +347,7 @@ rtems_rtl_obj_section_handler (uint32_t mask,
}
bool
-rtems_rtl_match_name (rtems_rtl_obj_t* obj, const char* name)
+rtems_rtl_match_name (rtems_rtl_obj* obj, const char* name)
{
const char* n1 = obj->oname;
while ((*n1 != '\0') && (*n1 != '\n') && (*n1 != '/') &&
@@ -363,10 +363,10 @@ rtems_rtl_match_name (rtems_rtl_obj_t* obj, const char* name)
}
bool
-rtems_rtl_obj_find_file (rtems_rtl_obj_t* obj, const char* name)
+rtems_rtl_obj_find_file (rtems_rtl_obj* obj, const char* name)
{
- const char* pname;
- rtems_rtl_data_t* rtl;
+ const char* pname;
+ rtems_rtl_data* rtl;
/*
* Parse the name. The object descriptor will have the archive name and/or
@@ -403,21 +403,21 @@ rtems_rtl_obj_find_file (rtems_rtl_obj_t* obj, const char* name)
}
bool
-rtems_rtl_obj_add_section (rtems_rtl_obj_t* obj,
- int section,
- const char* name,
- size_t size,
- off_t offset,
- uint32_t alignment,
- int link,
- int info,
- uint32_t flags)
+rtems_rtl_obj_add_section (rtems_rtl_obj* obj,
+ int section,
+ const char* name,
+ size_t size,
+ off_t offset,
+ uint32_t alignment,
+ int link,
+ int info,
+ uint32_t flags)
{
if (size > 0)
{
- rtems_rtl_obj_sect_t* sect = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
- sizeof (rtems_rtl_obj_sect_t),
- true);
+ rtems_rtl_obj_sect* sect = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
+ sizeof (rtems_rtl_obj_sect),
+ true);
if (!sect)
{
rtems_rtl_set_error (ENOMEM, "adding allocated section");
@@ -442,13 +442,13 @@ rtems_rtl_obj_add_section (rtems_rtl_obj_t* obj,
}
void
-rtems_rtl_obj_erase_sections (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_erase_sections (rtems_rtl_obj* obj)
{
rtems_chain_node* node = rtems_chain_first (&obj->sections);
while (!rtems_chain_is_tail (&obj->sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_chain_node* next_node = rtems_chain_next (node);
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_chain_node* next_node = rtems_chain_next (node);
rtems_chain_extract (node);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, (void*) sect->name);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, sect);
@@ -461,16 +461,16 @@ rtems_rtl_obj_erase_sections (rtems_rtl_obj_t* obj)
*/
typedef struct
{
- rtems_rtl_obj_sect_t* sect; /**< The matching section. */
- const char* name; /**< The name to match. */
- int index; /**< The index to match. */
-} rtems_rtl_obj_sect_finder_t;
+ rtems_rtl_obj_sect* sect; /**< The matching section. */
+ const char* name; /**< The name to match. */
+ int index; /**< The index to match. */
+} rtems_rtl_obj_sect_finder;
static bool
rtems_rtl_obj_sect_match_name (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_rtl_obj_sect_finder_t* match = data;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_rtl_obj_sect_finder* match = data;
if (strcmp (sect->name, match->name) == 0)
{
match->sect = sect;
@@ -479,11 +479,11 @@ rtems_rtl_obj_sect_match_name (rtems_chain_node* node, void* data)
return true;
}
-rtems_rtl_obj_sect_t*
-rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
- const char* name)
+rtems_rtl_obj_sect*
+rtems_rtl_obj_find_section (const rtems_rtl_obj* obj,
+ const char* name)
{
- rtems_rtl_obj_sect_finder_t match;
+ rtems_rtl_obj_sect_finder match;
match.sect = NULL;
match.name = name;
rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
@@ -495,8 +495,8 @@ rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
static bool
rtems_rtl_obj_sect_match_index (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_rtl_obj_sect_finder_t* match = data;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_rtl_obj_sect_finder* match = data;
if (sect->section == match->index)
{
match->sect = sect;
@@ -505,11 +505,11 @@ rtems_rtl_obj_sect_match_index (rtems_chain_node* node, void* data)
return true;
}
-rtems_rtl_obj_sect_t*
-rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t* obj,
- int index)
+rtems_rtl_obj_sect*
+rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj* obj,
+ int index)
{
- rtems_rtl_obj_sect_finder_t match;
+ rtems_rtl_obj_sect_finder match;
match.sect = NULL;
match.index = index;
rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
@@ -519,70 +519,70 @@ rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t* obj,
}
size_t
-rtems_rtl_obj_text_size (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_text_size (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_TEXT);
}
uint32_t
-rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_text_alignment (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_TEXT);
}
size_t
-rtems_rtl_obj_const_size (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_const_size (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_CONST);
}
uint32_t
-rtems_rtl_obj_eh_alignment (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_eh_alignment (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_EH);
}
size_t
-rtems_rtl_obj_eh_size (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_eh_size (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_EH);
}
uint32_t
-rtems_rtl_obj_const_alignment (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_const_alignment (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_CONST);
}
size_t
-rtems_rtl_obj_data_size (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_data_size (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_DATA);
}
uint32_t
-rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_data_alignment (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_DATA);
}
size_t
-rtems_rtl_obj_bss_size (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_bss_size (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_BSS);
}
uint32_t
-rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t* obj)
+rtems_rtl_obj_bss_alignment (const rtems_rtl_obj* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_BSS);
}
bool
-rtems_rtl_obj_relocate (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data)
+rtems_rtl_obj_relocate (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data)
{
uint32_t mask = RTEMS_RTL_OBJ_SECT_REL | RTEMS_RTL_OBJ_SECT_RELA;
return rtems_rtl_obj_section_handler (mask, obj, fd, handler, data);
@@ -597,15 +597,15 @@ typedef struct
void *start_va;
void *end_va;
size_t cache_line_size;
-} rtems_rtl_obj_sect_sync_ctx_t;
+} rtems_rtl_obj_sect_sync_ctx;
static bool
rtems_rtl_obj_sect_sync_handler (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
- rtems_rtl_obj_sect_sync_ctx_t* sync_ctx = data;
- uintptr_t old_end;
- uintptr_t new_start;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
+ rtems_rtl_obj_sect_sync_ctx* sync_ctx = data;
+ uintptr_t old_end;
+ uintptr_t new_start;
if ((sect->flags & sync_ctx->mask) == 0 || sect->size == 0)
return true;
@@ -633,9 +633,9 @@ rtems_rtl_obj_sect_sync_handler (rtems_chain_node* node, void* data)
}
void
-rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_synchronize_cache (rtems_rtl_obj* obj)
{
- rtems_rtl_obj_sect_sync_ctx_t sync_ctx;
+ rtems_rtl_obj_sect_sync_ctx sync_ctx;
if (rtems_cache_get_instruction_line_size() == 0)
return;
@@ -659,19 +659,19 @@ rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_obj_load_symbols (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data)
+rtems_rtl_obj_load_symbols (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data)
{
uint32_t mask = RTEMS_RTL_OBJ_SECT_SYM;
return rtems_rtl_obj_section_handler (mask, obj, fd, handler, data);
}
static int
-rtems_rtl_obj_sections_linked_to_order (rtems_rtl_obj_t* obj,
- int section,
- uint32_t visited_mask)
+rtems_rtl_obj_sections_linked_to_order (rtems_rtl_obj* obj,
+ int section,
+ uint32_t visited_mask)
{
rtems_chain_control* sections = &obj->sections;
rtems_chain_node* node = rtems_chain_first (sections);
@@ -681,7 +681,7 @@ rtems_rtl_obj_sections_linked_to_order (rtems_rtl_obj_t* obj,
*/
while (!rtems_chain_is_tail (sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if (sect->section == section)
{
const uint32_t mask = sect->flags & RTEMS_RTL_OBJ_SECT_TYPES;
@@ -704,7 +704,7 @@ rtems_rtl_obj_sections_linked_to_order (rtems_rtl_obj_t* obj,
node = rtems_chain_first (sections);
while (!rtems_chain_is_tail (sections, node))
{
- sect = (rtems_rtl_obj_sect_t*) node;
+ sect = (rtems_rtl_obj_sect*) node;
if ((sect->flags & mask) == mask)
{
if (sect->section == section)
@@ -721,14 +721,14 @@ rtems_rtl_obj_sections_linked_to_order (rtems_rtl_obj_t* obj,
}
static void
-rtems_rtl_obj_sections_link_order (uint32_t mask, rtems_rtl_obj_t* obj)
+rtems_rtl_obj_sections_link_order (uint32_t mask, rtems_rtl_obj* obj)
{
rtems_chain_control* sections = &obj->sections;
rtems_chain_node* node = rtems_chain_first (sections);
int order = 0;
while (!rtems_chain_is_tail (sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->flags & mask) == mask)
{
/*
@@ -750,12 +750,12 @@ rtems_rtl_obj_sections_link_order (uint32_t mask, rtems_rtl_obj_t* obj)
}
static size_t
-rtems_rtl_obj_sections_loader (uint32_t mask,
- rtems_rtl_obj_t* obj,
- int fd,
- uint8_t* base,
- rtems_rtl_obj_sect_handler_t handler,
- void* data)
+rtems_rtl_obj_sections_loader (uint32_t mask,
+ rtems_rtl_obj* obj,
+ int fd,
+ uint8_t* base,
+ rtems_rtl_obj_sect_handler handler,
+ void* data)
{
rtems_chain_control* sections = &obj->sections;
rtems_chain_node* node = rtems_chain_first (sections);
@@ -765,7 +765,7 @@ rtems_rtl_obj_sections_loader (uint32_t mask,
while (!rtems_chain_is_tail (sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->size != 0) && ((sect->flags & mask) != 0))
{
@@ -819,10 +819,10 @@ rtems_rtl_obj_sections_loader (uint32_t mask,
}
bool
-rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_handler_t handler,
- void* data)
+rtems_rtl_obj_load_sections (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect_handler handler,
+ void* data)
{
size_t text_size;
size_t const_size;
@@ -907,17 +907,17 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
}
static void
-rtems_rtl_obj_run_cdtors (rtems_rtl_obj_t* obj, uint32_t mask)
+rtems_rtl_obj_run_cdtors (rtems_rtl_obj* obj, uint32_t mask)
{
rtems_chain_node* node = rtems_chain_first (&obj->sections);
while (!rtems_chain_is_tail (&obj->sections, node))
{
- rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ rtems_rtl_obj_sect* sect = (rtems_rtl_obj_sect*) node;
if ((sect->flags & mask) == mask)
{
- rtems_rtl_cdtor_t* handler;
- size_t handlers = sect->size / sizeof (rtems_rtl_cdtor_t);
- int c;
+ rtems_rtl_cdtor* handler;
+ size_t handlers = sect->size / sizeof (rtems_rtl_cdtor);
+ int c;
for (c = 0, handler = sect->base; c < handlers; ++c)
if (*handler)
(*handler) ();
@@ -927,13 +927,13 @@ rtems_rtl_obj_run_cdtors (rtems_rtl_obj_t* obj, uint32_t mask)
}
void
-rtems_rtl_obj_run_ctors (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_run_ctors (rtems_rtl_obj* obj)
{
return rtems_rtl_obj_run_cdtors (obj, RTEMS_RTL_OBJ_SECT_CTOR);
}
void
-rtems_rtl_obj_run_dtors (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_run_dtors (rtems_rtl_obj* obj)
{
return rtems_rtl_obj_run_cdtors (obj, RTEMS_RTL_OBJ_SECT_DTOR);
}
@@ -943,7 +943,7 @@ rtems_rtl_obj_run_dtors (rtems_rtl_obj_t* obj)
* object descriptor.
*/
static bool
-rtems_rtl_obj_archive_find (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_obj_archive_find (rtems_rtl_obj* obj, int fd)
{
#define RTEMS_RTL_AR_IDENT "!<arch>\n"
#define RTEMS_RTL_AR_IDENT_SIZE (sizeof (RTEMS_RTL_AR_IDENT) - 1)
@@ -1167,11 +1167,11 @@ rtems_rtl_obj_archive_find (rtems_rtl_obj_t* obj, int fd)
}
static bool
-rtems_rtl_obj_file_load (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_obj_file_load (rtems_rtl_obj* obj, int fd)
{
int l;
- for (l = 0; l < (sizeof (loaders) / sizeof (rtems_rtl_loader_table_t)); ++l)
+ for (l = 0; l < (sizeof (loaders) / sizeof (rtems_rtl_loader_table)); ++l)
{
if (loaders[l].check (obj, fd))
{
@@ -1185,7 +1185,7 @@ rtems_rtl_obj_file_load (rtems_rtl_obj_t* obj, int fd)
}
static bool
-rtems_rtl_obj_file_unload (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_file_unload (rtems_rtl_obj* obj)
{
if (obj->format >= 0 && obj->format < RTEMS_RTL_LOADERS)
return loaders[obj->format].unload (obj);
@@ -1193,7 +1193,7 @@ rtems_rtl_obj_file_unload (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_obj_load (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_load (rtems_rtl_obj* obj)
{
int fd;
@@ -1244,7 +1244,7 @@ rtems_rtl_obj_load (rtems_rtl_obj_t* obj)
}
bool
-rtems_rtl_obj_unload (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_unload (rtems_rtl_obj* obj)
{
_rtld_linkmap_delete(obj);
rtems_rtl_obj_file_unload (obj);
diff --git a/cpukit/libdl/rtl-rap.c b/cpukit/libdl/rtl-rap.c
index 59b3801f76..afbc268be6 100644
--- a/cpukit/libdl/rtl-rap.c
+++ b/cpukit/libdl/rtl-rap.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012-2013 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2013, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -45,7 +45,7 @@
/**
* The ELF format signature.
*/
-static rtems_rtl_loader_format_t rap_sig =
+static rtems_rtl_loader_format rap_sig =
{
.label = "RAP",
.flags = RTEMS_RTL_FMT_COMP
@@ -54,11 +54,11 @@ static rtems_rtl_loader_format_t rap_sig =
/**
* The section definitions found in a RAP file.
*/
-typedef struct rtems_rtl_rap_sectdef_s
+typedef struct rtems_rtl_rap_sectdef
{
const char* name; /**< Name of the section. */
const uint32_t flags; /**< Section flags. */
-} rtems_rtl_rap_sectdef_t;
+} rtems_rtl_rap_sectdef;
/**
* The section indexes. These are fixed.
@@ -74,7 +74,7 @@ typedef struct rtems_rtl_rap_sectdef_s
/**
* The sections as loaded from a RAP file.
*/
-static const rtems_rtl_rap_sectdef_t rap_sections[RTEMS_RTL_RAP_SECS] =
+static const rtems_rtl_rap_sectdef rap_sections[RTEMS_RTL_RAP_SECS] =
{
{ ".text", RTEMS_RTL_OBJ_SECT_TEXT | RTEMS_RTL_OBJ_SECT_LOAD },
{ ".const", RTEMS_RTL_OBJ_SECT_CONST | RTEMS_RTL_OBJ_SECT_LOAD },
@@ -87,38 +87,38 @@ static const rtems_rtl_rap_sectdef_t rap_sections[RTEMS_RTL_RAP_SECS] =
/**
* The section definitions found in a RAP file.
*/
-typedef struct rtems_rtl_rap_section_s
+typedef struct rtems_rtl_rap_section
{
uint32_t size; /**< The size of the section. */
uint32_t alignment; /**< The alignment of the section. */
-} rtems_rtl_rap_section_t;
+} rtems_rtl_rap_section;
/**
* The RAP loader.
*/
-typedef struct rtems_rtl_rap_s
+typedef struct rtems_rtl_rap
{
- rtems_rtl_obj_cache_t* file; /**< The file cache for the RAP file. */
- rtems_rtl_obj_comp_t* decomp; /**< The decompression streamer. */
- uint32_t length; /**< The file length. */
- uint32_t version; /**< The RAP file version. */
- uint32_t compression; /**< The type of compression. */
- uint32_t checksum; /**< The checksum. */
- uint32_t machinetype; /**< The ELF machine type. */
- uint32_t datatype; /**< The ELF data type. */
- uint32_t class; /**< The ELF class. */
- uint32_t init; /**< The initialisation strtab offset. */
- uint32_t fini; /**< The finish strtab offset. */
- rtems_rtl_rap_section_t secs[RTEMS_RTL_RAP_SECS]; /**< The sections. */
- uint32_t symtab_size; /**< The symbol table size. */
- char* strtab; /**< The string table. */
- uint32_t strtab_size; /**< The string table size. */
- uint32_t relocs_size; /**< The relocation table size. */
- uint32_t symbols; /**< The number of symbols. */
- uint32_t strtable_size;/**< The size of section names and obj names. */
- uint32_t rpathlen; /**< The length of rpath. */
- char* strtable; /**< The detail string which resides in obj detail. */
-} rtems_rtl_rap_t;
+ rtems_rtl_obj_cache* file; /**< The file cache for the RAP file. */
+ rtems_rtl_obj_comp* decomp; /**< The decompression streamer. */
+ uint32_t length; /**< The file length. */
+ uint32_t version; /**< The RAP file version. */
+ uint32_t compression; /**< The type of compression. */
+ uint32_t checksum; /**< The checksum. */
+ uint32_t machinetype; /**< The ELF machine type. */
+ uint32_t datatype; /**< The ELF data type. */
+ uint32_t class; /**< The ELF class. */
+ uint32_t init; /**< The initialisation strtab offset. */
+ uint32_t fini; /**< The finish strtab offset. */
+ rtems_rtl_rap_section secs[RTEMS_RTL_RAP_SECS]; /**< The sections. */
+ uint32_t symtab_size; /**< The symbol table size. */
+ char* strtab; /**< The string table. */
+ uint32_t strtab_size; /**< The string table size. */
+ uint32_t relocs_size; /**< The relocation table size. */
+ uint32_t symbols; /**< The number of symbols. */
+ uint32_t strtable_size;/**< The size of section names and obj names. */
+ uint32_t rpathlen; /**< The length of rpath. */
+ char* strtable; /**< The detail string which resides in obj detail. */
+} rtems_rtl_rap;
/**
* Check the machine type.
@@ -191,7 +191,7 @@ rtems_rtl_rap_get_uint32 (const uint8_t* buffer)
}
static bool
-rtems_rtl_rap_read_uint32 (rtems_rtl_obj_comp_t* comp, uint32_t* value)
+rtems_rtl_rap_read_uint32 (rtems_rtl_obj_comp* comp, uint32_t* value)
{
uint8_t buffer[sizeof (uint32_t)];
@@ -204,12 +204,12 @@ rtems_rtl_rap_read_uint32 (rtems_rtl_obj_comp_t* comp, uint32_t* value)
}
static bool
-rtems_rtl_rap_loader (rtems_rtl_obj_t* obj,
- int fd,
- rtems_rtl_obj_sect_t* sect,
- void* data)
+rtems_rtl_rap_loader (rtems_rtl_obj* obj,
+ int fd,
+ rtems_rtl_obj_sect* sect,
+ void* data)
{
- rtems_rtl_rap_t* rap = (rtems_rtl_rap_t*) data;
+ rtems_rtl_rap* rap = (rtems_rtl_rap*) data;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
printf ("rtl: rap: input %s=%" PRIu32 "\n",
@@ -219,7 +219,7 @@ rtems_rtl_rap_loader (rtems_rtl_obj_t* obj,
}
static bool
-rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
+rtems_rtl_rap_relocate (rtems_rtl_rap* rap, rtems_rtl_obj* obj)
{
#define SYMNAME_BUFFER_SIZE (1024)
char* symname_buffer = NULL;
@@ -237,11 +237,11 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
for (section = 0; section < RTEMS_RTL_RAP_SECS; ++section)
{
- rtems_rtl_obj_sect_t* targetsect;
- uint32_t header = 0;
- int relocs;
- bool is_rela;
- int r;
+ rtems_rtl_obj_sect* targetsect;
+ uint32_t header = 0;
+ int relocs;
+ bool is_rela;
+ int r;
targetsect = rtems_rtl_obj_find_section (obj, rap_sections[section].name);
@@ -320,7 +320,7 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
if ((info & (1 << 31)) == 0)
{
- rtems_rtl_obj_sect_t* symsect;
+ rtems_rtl_obj_sect* symsect;
symsect = rtems_rtl_obj_find_section_by_index (obj, info >> 8);
if (!symsect)
@@ -333,7 +333,7 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
}
else if (rtems_rtl_elf_rel_resolve_sym (type))
{
- rtems_rtl_obj_sym_t* symbol;
+ rtems_rtl_obj_sym* symbol;
symname_size = (info & ~(3 << 30)) >> 8;
@@ -432,7 +432,7 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
*
*/
static bool
-rtems_rtl_rap_load_linkmap (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
+rtems_rtl_rap_load_linkmap (rtems_rtl_rap* rap, rtems_rtl_obj* obj)
{
void* detail;
struct link_map* tmp1;
@@ -565,13 +565,13 @@ rtems_rtl_rap_load_linkmap (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
}
static bool
-rtems_rtl_rap_load_symbols (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
+rtems_rtl_rap_load_symbols (rtems_rtl_rap* rap, rtems_rtl_obj* obj)
{
- rtems_rtl_obj_sym_t* gsym;
- int sym;
+ rtems_rtl_obj_sym* gsym;
+ int sym;
obj->global_size =
- rap->symbols * sizeof (rtems_rtl_obj_sym_t) + rap->strtab_size;
+ rap->symbols * sizeof (rtems_rtl_obj_sym) + rap->strtab_size;
obj->global_table = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_SYMBOL,
obj->global_size, true);
@@ -585,7 +585,7 @@ rtems_rtl_rap_load_symbols (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
obj->global_syms = rap->symbols;
rap->strtab = (((char*) obj->global_table) +
- (rap->symbols * sizeof (rtems_rtl_obj_sym_t)));
+ (rap->symbols * sizeof (rtems_rtl_obj_sym)));
if (!rtems_rtl_obj_comp_read (rap->decomp, rap->strtab, rap->strtab_size))
{
@@ -595,10 +595,10 @@ rtems_rtl_rap_load_symbols (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
for (sym = 0, gsym = obj->global_table; sym < rap->symbols; ++sym)
{
- rtems_rtl_obj_sect_t* symsect;
- uint32_t data;
- uint32_t name;
- uint32_t value;
+ rtems_rtl_obj_sect* symsect;
+ uint32_t data;
+ uint32_t name;
+ uint32_t value;
if (!rtems_rtl_rap_read_uint32 (rap->decomp, &data) ||
!rtems_rtl_rap_read_uint32 (rap->decomp, &name) ||
@@ -756,15 +756,15 @@ rtems_rtl_rap_parse_header (uint8_t* rhdr,
}
bool
-rtems_rtl_rap_file_check (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_rap_file_check (rtems_rtl_obj* obj, int fd)
{
- rtems_rtl_obj_cache_t* header;
- uint8_t* rhdr = NULL;
- size_t rlen = 64;
- uint32_t length = 0;
- uint32_t version = 0;
- uint32_t compression = 0;
- uint32_t checksum = 0;
+ rtems_rtl_obj_cache* header;
+ uint8_t* rhdr = NULL;
+ size_t rlen = 64;
+ uint32_t length = 0;
+ uint32_t version = 0;
+ uint32_t compression = 0;
+ uint32_t checksum = 0;
rtems_rtl_obj_caches (&header, NULL, NULL);
@@ -784,12 +784,12 @@ rtems_rtl_rap_file_check (rtems_rtl_obj_t* obj, int fd)
}
bool
-rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
+rtems_rtl_rap_file_load (rtems_rtl_obj* obj, int fd)
{
- rtems_rtl_rap_t rap = { 0 };
- uint8_t* rhdr = NULL;
- size_t rlen = 64;
- int section;
+ rtems_rtl_rap rap = { 0 };
+ uint8_t* rhdr = NULL;
+ size_t rlen = 64;
+ int section;
rtems_rtl_obj_caches (&rap.file, NULL, NULL);
@@ -811,8 +811,8 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
/*
* Set up the decompressor.
*/
- rtems_rtl_obj_comp (&rap.decomp, rap.file, fd, rap.compression,
- rlen + obj->ooffset);
+ rtems_rtl_obj_decompress (&rap.decomp, rap.file, fd, rap.compression,
+ rlen + obj->ooffset);
/*
* uint32_t: machinetype
@@ -990,13 +990,13 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
}
bool
-rtems_rtl_rap_file_unload (rtems_rtl_obj_t* obj)
+rtems_rtl_rap_file_unload (rtems_rtl_obj* obj)
{
(void) obj;
return true;
}
-rtems_rtl_loader_format_t*
+rtems_rtl_loader_format*
rtems_rtl_rap_file_sig (void)
{
return &rap_sig;
diff --git a/cpukit/libdl/rtl-rap.h b/cpukit/libdl/rtl-rap.h
index e96f342cea..ae656c25ca 100644
--- a/cpukit/libdl/rtl-rap.h
+++ b/cpukit/libdl/rtl-rap.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -30,7 +30,7 @@ extern "C" {
* @param obj The object being checked.
* @param fd The file descriptor.
*/
-bool rtems_rtl_rap_file_check (rtems_rtl_obj_t* obj, int fd);
+bool rtems_rtl_rap_file_check (rtems_rtl_obj* obj, int fd);
/**
* The RAP format load handler.
@@ -38,21 +38,21 @@ bool rtems_rtl_rap_file_check (rtems_rtl_obj_t* obj, int fd);
* @param obj The object to load.
* @param fd The file descriptor.
*/
-bool rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd);
+bool rtems_rtl_rap_file_load (rtems_rtl_obj* obj, int fd);
/**
* The RAP format unload handler.
*
* @param obj The object to unload.
*/
-bool rtems_rtl_rap_file_unload (rtems_rtl_obj_t* obj);
+bool rtems_rtl_rap_file_unload (rtems_rtl_obj* obj);
/**
* The RAP format signature handler.
*
- * @return rtems_rtl_loader_format_t* The format's signature.
+ * @return rtems_rtl_loader_format* The format's signature.
*/
-rtems_rtl_loader_format_t* rtems_rtl_rap_file_sig (void);
+rtems_rtl_loader_format* rtems_rtl_rap_file_sig (void);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c
index e1a197ed62..5c144977a0 100644
--- a/cpukit/libdl/rtl-shell.c
+++ b/cpukit/libdl/rtl-shell.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -33,17 +33,17 @@
/**
* The type of the shell handlers we have.
*/
-typedef int (*rtems_rtl_shell_handler_t) (rtems_rtl_data_t* rtl, int argc, char *argv[]);
+typedef int (*rtems_rtl_shell_handler) (rtems_rtl_data* rtl, int argc, char *argv[]);
/**
* Table of handlers we parse to invoke the command.
*/
typedef struct
{
- const char* name; /**< The sub-command's name. */
- rtems_rtl_shell_handler_t handler; /**< The sub-command's handler. */
- const char* help; /**< The sub-command's help. */
-} rtems_rtl_shell_cmd_t;
+ const char* name; /**< The sub-command's name. */
+ rtems_rtl_shell_handler handler; /**< The sub-command's handler. */
+ const char* help; /**< The sub-command's help. */
+} rtems_rtl_shell_cmd;
/**
* Object summary data.
@@ -53,7 +53,7 @@ typedef struct
int count; /**< The number of object files. */
size_t exec; /**< The amount of executable memory allocated. */
size_t symbols; /**< The amount of symbol memory allocated. */
-} rtems_rtl_obj_summary_t;
+} rtems_rtl_obj_summary;
/**
* Object summary iterator.
@@ -61,8 +61,8 @@ typedef struct
static bool
rtems_rtl_obj_summary_iterator (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_summary_t* summary = data;
- rtems_rtl_obj_t* obj = (rtems_rtl_obj_t*) node;
+ rtems_rtl_obj_summary* summary = data;
+ rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
++summary->count;
summary->exec += obj->exec_size;
summary->symbols += obj->global_size;
@@ -73,7 +73,7 @@ rtems_rtl_obj_summary_iterator (rtems_chain_node* node, void* data)
* Count the number of symbols.
*/
static int
-rtems_rtl_count_symbols (rtems_rtl_data_t* rtl)
+rtems_rtl_count_symbols (rtems_rtl_data* rtl)
{
int count;
int bucket;
@@ -83,10 +83,10 @@ rtems_rtl_count_symbols (rtems_rtl_data_t* rtl)
}
static int
-rtems_rtl_shell_status (rtems_rtl_data_t* rtl, int argc, char *argv[])
+rtems_rtl_shell_status (rtems_rtl_data* rtl, int argc, char *argv[])
{
- rtems_rtl_obj_summary_t summary;
- size_t total_memory;
+ rtems_rtl_obj_summary summary;
+ size_t total_memory;
summary.count = 0;
summary.exec = 0;
@@ -98,7 +98,7 @@ rtems_rtl_shell_status (rtems_rtl_data_t* rtl, int argc, char *argv[])
* Currently does not include the name strings in the obj struct.
*/
total_memory =
- sizeof (*rtl) + (summary.count * sizeof (rtems_rtl_obj_t)) +
+ sizeof (*rtl) + (summary.count * sizeof (rtems_rtl_obj)) +
summary.exec + summary.symbols;
printf ("Runtime Linker Status:\n");
@@ -117,14 +117,14 @@ rtems_rtl_shell_status (rtems_rtl_data_t* rtl, int argc, char *argv[])
*/
typedef struct
{
- rtems_rtl_data_t* rtl; /**< The RTL data. */
- int indent; /**< Spaces to indent. */
- bool oname; /**< Print object names. */
- bool names; /**< Print details of all names. */
- bool memory_map; /**< Print the memory map. */
- bool symbols; /**< Print the global symbols. */
- bool base; /**< Include the base object file. */
-} rtems_rtl_obj_print_t;
+ rtems_rtl_data* rtl; /**< The RTL data. */
+ int indent; /**< Spaces to indent. */
+ bool oname; /**< Print object names. */
+ bool names; /**< Print details of all names. */
+ bool memory_map; /**< Print the memory map. */
+ bool symbols; /**< Print the global symbols. */
+ bool base; /**< Include the base object file. */
+} rtems_rtl_obj_print;
/**
* Return the different between 2 void*.
@@ -172,7 +172,7 @@ rtems_rtl_symbols_arg (int argc, char *argv[])
* Object printer.
*/
static bool
-rtems_rtl_obj_printer (rtems_rtl_obj_print_t* print, rtems_rtl_obj_t* obj)
+rtems_rtl_obj_printer (rtems_rtl_obj_print* print, rtems_rtl_obj* obj)
{
char flags_str[33];
@@ -239,10 +239,10 @@ rtems_rtl_obj_printer (rtems_rtl_obj_print_t* print, rtems_rtl_obj_t* obj)
* Object unresolved symbols printer.
*/
static bool
-rtems_rtl_unresolved_printer (rtems_rtl_unresolv_rec_t* rec,
- void* data)
+rtems_rtl_unresolved_printer (rtems_rtl_unresolv_rec* rec,
+ void* data)
{
- rtems_rtl_obj_print_t* print = (rtems_rtl_obj_print_t*) data;
+ rtems_rtl_obj_print* print = (rtems_rtl_obj_print*) data;
if (rec->type == rtems_rtl_unresolved_name)
printf ("%-*c%s\n", print->indent + 2, ' ', rec->rec.name.name);
return false;
@@ -254,15 +254,15 @@ rtems_rtl_unresolved_printer (rtems_rtl_unresolv_rec_t* rec,
static bool
rtems_rtl_obj_print_iterator (rtems_chain_node* node, void* data)
{
- rtems_rtl_obj_print_t* print = data;
- rtems_rtl_obj_t* obj = (rtems_rtl_obj_t*) node;
+ rtems_rtl_obj_print* print = data;
+ rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
return rtems_rtl_obj_printer (print, obj);
}
static int
-rtems_rtl_shell_list (rtems_rtl_data_t* rtl, int argc, char *argv[])
+rtems_rtl_shell_list (rtems_rtl_data* rtl, int argc, char *argv[])
{
- rtems_rtl_obj_print_t print;
+ rtems_rtl_obj_print print;
print.rtl = rtl;
print.indent = 1;
print.oname = true;
@@ -277,9 +277,9 @@ rtems_rtl_shell_list (rtems_rtl_data_t* rtl, int argc, char *argv[])
}
static int
-rtems_rtl_shell_sym (rtems_rtl_data_t* rtl, int argc, char *argv[])
+rtems_rtl_shell_sym (rtems_rtl_data* rtl, int argc, char *argv[])
{
- rtems_rtl_obj_print_t print;
+ rtems_rtl_obj_print print;
print.rtl = rtl;
print.indent = 1;
print.oname = true;
@@ -296,7 +296,7 @@ rtems_rtl_shell_sym (rtems_rtl_data_t* rtl, int argc, char *argv[])
}
static int
-rtems_rtl_shell_object (rtems_rtl_data_t* rtl, int argc, char *argv[])
+rtems_rtl_shell_object (rtems_rtl_data* rtl, int argc, char *argv[])
{
return 0;
}
@@ -315,7 +315,7 @@ rtems_rtl_shell_usage (const char* arg)
int
rtems_rtl_shell_command (int argc, char* argv[])
{
- const rtems_rtl_shell_cmd_t table[] =
+ const rtems_rtl_shell_cmd table[] =
{
{ "status", rtems_rtl_shell_status,
"Display the status of the RTL" },
@@ -343,7 +343,7 @@ rtems_rtl_shell_command (int argc, char* argv[])
case 'l':
printf ("%s: commands are:\n", argv[0]);
for (t = 0;
- t < (sizeof (table) / sizeof (const rtems_rtl_shell_cmd_t));
+ t < (sizeof (table) / sizeof (const rtems_rtl_shell_cmd));
++t)
printf (" %s\t%s\n", table[t].name, table[t].help);
return 0;
@@ -358,13 +358,13 @@ rtems_rtl_shell_command (int argc, char* argv[])
else
{
for (t = 0;
- t < (sizeof (table) / sizeof (const rtems_rtl_shell_cmd_t));
+ t < (sizeof (table) / sizeof (const rtems_rtl_shell_cmd));
++t)
{
if (strncmp (argv[arg], table[t].name, strlen (argv[arg])) == 0)
{
- rtems_rtl_data_t* rtl = rtems_rtl_data ();
- int r;
+ rtems_rtl_data* rtl = rtems_rtl_lock ();
+ int r;
if (!rtl)
{
printf ("error: cannot lock the linker\n");
diff --git a/cpukit/libdl/rtl-sym.c b/cpukit/libdl/rtl-sym.c
index 17eca99738..c27f2ee676 100644
--- a/cpukit/libdl/rtl-sym.c
+++ b/cpukit/libdl/rtl-sym.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012-2014 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2014, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -32,7 +32,7 @@
* The single symbol forced into the global symbol table that is used to load a
* symbol table from an object file.
*/
-static rtems_rtl_obj_sym_t global_sym_add =
+static rtems_rtl_obj_sym global_sym_add =
{
.name = "rtems_rtl_base_sym_global_add",
.value = (void*) rtems_rtl_base_sym_global_add
@@ -49,8 +49,8 @@ rtems_rtl_symbol_hash (const char *s)
}
static void
-rtems_rtl_symbol_global_insert (rtems_rtl_symbols_t* symbols,
- rtems_rtl_obj_sym_t* symbol)
+rtems_rtl_symbol_global_insert (rtems_rtl_symbols* symbols,
+ rtems_rtl_obj_sym* symbol)
{
uint_fast32_t hash = rtems_rtl_symbol_hash (symbol->name);
rtems_chain_append (&symbols->buckets[hash % symbols->nbuckets],
@@ -58,8 +58,8 @@ rtems_rtl_symbol_global_insert (rtems_rtl_symbols_t* symbols,
}
bool
-rtems_rtl_symbol_table_open (rtems_rtl_symbols_t* symbols,
- size_t buckets)
+rtems_rtl_symbol_table_open (rtems_rtl_symbols* symbols,
+ size_t buckets)
{
symbols->buckets = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_SYMBOL,
buckets * sizeof (rtems_chain_control),
@@ -77,21 +77,21 @@ rtems_rtl_symbol_table_open (rtems_rtl_symbols_t* symbols,
}
void
-rtems_rtl_symbol_table_close (rtems_rtl_symbols_t* symbols)
+rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols)
{
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_SYMBOL, symbols->buckets);
}
bool
-rtems_rtl_symbol_global_add (rtems_rtl_obj_t* obj,
+rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size)
{
- rtems_rtl_symbols_t* symbols;
- rtems_rtl_obj_sym_t* sym;
- size_t count;
- size_t s;
- uint32_t marker;
+ rtems_rtl_symbols* symbols;
+ rtems_rtl_obj_sym* sym;
+ size_t count;
+ size_t s;
+ uint32_t marker;
count = 0;
s = 0;
@@ -127,7 +127,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj_t* obj,
if (rtems_rtl_trace (RTEMS_RTL_TRACE_GLOBAL_SYM))
printf ("rtl: global symbol add: %zi\n", count);
- obj->global_size = count * sizeof (rtems_rtl_obj_sym_t);
+ obj->global_size = count * sizeof (rtems_rtl_obj_sym);
obj->global_table = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_SYMBOL,
obj->global_size, true);
if (!obj->global_table)
@@ -172,10 +172,10 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj_t* obj,
return true;
}
-rtems_rtl_obj_sym_t*
+rtems_rtl_obj_sym*
rtems_rtl_symbol_global_find (const char* name)
{
- rtems_rtl_symbols_t* symbols;
+ rtems_rtl_symbols* symbols;
uint_fast32_t hash;
rtems_chain_control* bucket;
rtems_chain_node* node;
@@ -188,7 +188,7 @@ rtems_rtl_symbol_global_find (const char* name)
while (!rtems_chain_is_tail (bucket, node))
{
- rtems_rtl_obj_sym_t* sym = (rtems_rtl_obj_sym_t*) node;
+ rtems_rtl_obj_sym* sym = (rtems_rtl_obj_sym*) node;
/*
* Use the hash. I could add this to the symbol but it uses more memory.
*/
@@ -200,11 +200,11 @@ rtems_rtl_symbol_global_find (const char* name)
return NULL;
}
-rtems_rtl_obj_sym_t*
-rtems_rtl_symbol_obj_find (rtems_rtl_obj_t* obj, const char* name)
+rtems_rtl_obj_sym*
+rtems_rtl_symbol_obj_find (rtems_rtl_obj* obj, const char* name)
{
- rtems_rtl_obj_sym_t* sym;
- size_t s;
+ rtems_rtl_obj_sym* sym;
+ size_t s;
/*
* Check the object file's symbols first. If not found search the
* global symbol table.
@@ -225,11 +225,11 @@ rtems_rtl_symbol_obj_find (rtems_rtl_obj_t* obj, const char* name)
}
void
-rtems_rtl_symbol_obj_add (rtems_rtl_obj_t* obj)
+rtems_rtl_symbol_obj_add (rtems_rtl_obj* obj)
{
- rtems_rtl_symbols_t* symbols;
- rtems_rtl_obj_sym_t* sym;
- size_t s;
+ rtems_rtl_symbols* symbols;
+ rtems_rtl_obj_sym* sym;
+ size_t s;
symbols = rtems_rtl_global_symbols ();
@@ -238,7 +238,7 @@ rtems_rtl_symbol_obj_add (rtems_rtl_obj_t* obj)
}
void
-rtems_rtl_symbol_obj_erase_local (rtems_rtl_obj_t* obj)
+rtems_rtl_symbol_obj_erase_local (rtems_rtl_obj* obj)
{
if (obj->local_table)
{
@@ -250,13 +250,13 @@ rtems_rtl_symbol_obj_erase_local (rtems_rtl_obj_t* obj)
}
void
-rtems_rtl_symbol_obj_erase (rtems_rtl_obj_t* obj)
+rtems_rtl_symbol_obj_erase (rtems_rtl_obj* obj)
{
rtems_rtl_symbol_obj_erase_local (obj);
if (obj->global_table)
{
- rtems_rtl_obj_sym_t* sym;
- size_t s;
+ rtems_rtl_obj_sym* sym;
+ size_t s;
for (s = 0, sym = obj->global_table; s < obj->global_syms; ++s, ++sym)
if (!rtems_chain_is_node_off_chain (&sym->node))
rtems_chain_extract (&sym->node);
diff --git a/cpukit/libdl/rtl-unresolved.c b/cpukit/libdl/rtl-unresolved.c
index 0e318f4805..7422cee47b 100644
--- a/cpukit/libdl/rtl-unresolved.c
+++ b/cpukit/libdl/rtl-unresolved.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -28,16 +28,16 @@
#include <rtems/rtl/rtl-unresolved.h>
#include <rtems/rtl/rtl-trace.h>
-static rtems_rtl_unresolv_block_t*
-rtems_rtl_unresolved_block_alloc (rtems_rtl_unresolved_t* unresolved)
+static rtems_rtl_unresolv_block*
+rtems_rtl_unresolved_block_alloc (rtems_rtl_unresolved* unresolved)
{
/*
* The block header contains a record.
*/
size_t size =
- (sizeof(rtems_rtl_unresolv_block_t) +
- (sizeof(rtems_rtl_unresolv_rec_t) * (unresolved->block_recs - 1)));
- rtems_rtl_unresolv_block_t* block =
+ (sizeof(rtems_rtl_unresolv_block) +
+ (sizeof(rtems_rtl_unresolv_rec) * (unresolved->block_recs - 1)));
+ rtems_rtl_unresolv_block* block =
rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_EXTERNAL, size, true);
if (block)
rtems_chain_append (&unresolved->blocks, &block->link);
@@ -50,25 +50,25 @@ static size_t
rtems_rtl_unresolved_name_recs (const char* name)
{
size_t length = strlen (name);
- return ((length + sizeof(rtems_rtl_unresolv_name_t) - 1) /
- sizeof(rtems_rtl_unresolv_name_t));
+ return ((length + sizeof(rtems_rtl_unresolv_name) - 1) /
+ sizeof(rtems_rtl_unresolv_name));
}
static int
-rtems_rtl_unresolved_rec_index (rtems_rtl_unresolv_block_t* block,
- rtems_rtl_unresolv_rec_t* rec)
+rtems_rtl_unresolved_rec_index (rtems_rtl_unresolv_block* block,
+ rtems_rtl_unresolv_rec* rec)
{
- return (rec - &block->rec) / sizeof (rtems_rtl_unresolv_rec_t);
+ return (rec - &block->rec) / sizeof (rtems_rtl_unresolv_rec);
}
-static rtems_rtl_unresolv_rec_t*
-rtems_rtl_unresolved_rec_first (rtems_rtl_unresolv_block_t* block)
+static rtems_rtl_unresolv_rec*
+rtems_rtl_unresolved_rec_first (rtems_rtl_unresolv_block* block)
{
return &block->rec;
}
-static rtems_rtl_unresolv_rec_t*
-rtems_rtl_unresolved_rec_next (rtems_rtl_unresolv_rec_t* rec)
+static rtems_rtl_unresolv_rec*
+rtems_rtl_unresolved_rec_next (rtems_rtl_unresolv_rec* rec)
{
switch (rec->type)
@@ -84,8 +84,8 @@ rtems_rtl_unresolved_rec_next (rtems_rtl_unresolv_rec_t* rec)
/*
* Determine how many records the name occupies. Round up.
*/
- rec += ((rec->rec.name.length + sizeof(rtems_rtl_unresolv_name_t) - 1) /
- sizeof(rtems_rtl_unresolv_name_t));
+ rec += ((rec->rec.name.length + sizeof(rtems_rtl_unresolv_name) - 1) /
+ sizeof(rtems_rtl_unresolv_name));
break;
case rtems_rtl_unresolved_reloc:
@@ -100,23 +100,23 @@ rtems_rtl_unresolved_rec_next (rtems_rtl_unresolv_rec_t* rec)
}
static bool
-rtems_rtl_unresolved_rec_is_last (rtems_rtl_unresolv_block_t* block,
- rtems_rtl_unresolv_rec_t* rec)
+rtems_rtl_unresolved_rec_is_last (rtems_rtl_unresolv_block* block,
+ rtems_rtl_unresolv_rec* rec)
{
int index = (rec - &block->rec) / sizeof (rec);
return !rec || (index >= block->recs) || (rec->type == rtems_rtl_unresolved_empty);
}
-static rtems_rtl_unresolv_rec_t*
-rtems_rtl_unresolved_rec_first_free (rtems_rtl_unresolv_block_t* block)
+static rtems_rtl_unresolv_rec*
+rtems_rtl_unresolved_rec_first_free (rtems_rtl_unresolv_block* block)
{
return &block->rec + block->recs;
}
static int
-rtems_rtl_unresolved_find_name (rtems_rtl_unresolved_t* unresolved,
- const char* name,
- bool update_refcount)
+rtems_rtl_unresolved_find_name (rtems_rtl_unresolved* unresolved,
+ const char* name,
+ bool update_refcount)
{
size_t length = strlen (name);
int index = 1;
@@ -124,8 +124,8 @@ rtems_rtl_unresolved_find_name (rtems_rtl_unresolved_t* unresolved,
rtems_chain_node* node = rtems_chain_first (&unresolved->blocks);
while (!rtems_chain_is_tail (&unresolved->blocks, node))
{
- rtems_rtl_unresolv_block_t* block = (rtems_rtl_unresolv_block_t*) node;
- rtems_rtl_unresolv_rec_t* rec = rtems_rtl_unresolved_rec_first (block);
+ rtems_rtl_unresolv_block* block = (rtems_rtl_unresolv_block*) node;
+ rtems_rtl_unresolv_rec* rec = rtems_rtl_unresolved_rec_first (block);
while (!rtems_rtl_unresolved_rec_is_last (block, rec))
{
@@ -152,21 +152,21 @@ rtems_rtl_unresolved_find_name (rtems_rtl_unresolved_t* unresolved,
/**
* Struct to pass relocation data in the interator.
*/
-typedef struct rtems_rtl_unresolved_reloc_data_s
+typedef struct rtems_rtl_unresolved_reloc_data
{
uint16_t name; /**< Name index. */
- rtems_rtl_unresolv_rec_t* name_rec; /**< Name record. */
- rtems_rtl_obj_sym_t* sym; /**< The symbol record. */
-} rtems_rtl_unresolved_reloc_data_t;
+ rtems_rtl_unresolv_rec* name_rec; /**< Name record. */
+ rtems_rtl_obj_sym* sym; /**< The symbol record. */
+} rtems_rtl_unresolved_reloc_data;
static bool
-rtems_rtl_unresolved_resolve_reloc (rtems_rtl_unresolv_rec_t* rec,
- void* data)
+rtems_rtl_unresolved_resolve_reloc (rtems_rtl_unresolv_rec* rec,
+ void* data)
{
if (rec->type == rtems_rtl_unresolved_reloc)
{
- rtems_rtl_unresolved_reloc_data_t* rd;
- rd = (rtems_rtl_unresolved_reloc_data_t*) data;
+ rtems_rtl_unresolved_reloc_data* rd;
+ rd = (rtems_rtl_unresolved_reloc_data*) data;
if (rec->rec.reloc.name == rd->name)
{
@@ -190,13 +190,13 @@ rtems_rtl_unresolved_resolve_reloc (rtems_rtl_unresolv_rec_t* rec,
}
static bool
-rtems_rtl_unresolved_resolve_iterator (rtems_rtl_unresolv_rec_t* rec,
- void* data)
+rtems_rtl_unresolved_resolve_iterator (rtems_rtl_unresolv_rec* rec,
+ void* data)
{
if (rec->type == rtems_rtl_unresolved_name)
{
- rtems_rtl_unresolved_reloc_data_t* rd;
- rd = (rtems_rtl_unresolved_reloc_data_t*) data;
+ rtems_rtl_unresolved_reloc_data* rd;
+ rd = (rtems_rtl_unresolved_reloc_data*) data;
++rd->name;
@@ -223,25 +223,25 @@ rtems_rtl_unresolved_resolve_iterator (rtems_rtl_unresolv_rec_t* rec,
}
static void
-rtems_rtl_unresolved_clean_block (rtems_rtl_unresolv_block_t* block,
- rtems_rtl_unresolv_rec_t* rec,
- size_t count,
- size_t recs_per_block)
+rtems_rtl_unresolved_clean_block (rtems_rtl_unresolv_block* block,
+ rtems_rtl_unresolv_rec* rec,
+ size_t count,
+ size_t recs_per_block)
{
size_t index = rtems_rtl_unresolved_rec_index (block, rec);
size_t bytes =
- (block->recs - index - count) * sizeof (rtems_rtl_unresolv_rec_t);
+ (block->recs - index - count) * sizeof (rtems_rtl_unresolv_rec);
if (bytes)
memmove (rec, rec + count, bytes);
--block->recs;
- bytes = count * sizeof (rtems_rtl_unresolv_rec_t);
+ bytes = count * sizeof (rtems_rtl_unresolv_rec);
memset (&block->rec + block->recs, 0, bytes);
}
static void
rtems_rtl_unresolved_compact (void)
{
- rtems_rtl_unresolved_t* unresolved = rtems_rtl_unresolved ();
+ rtems_rtl_unresolved* unresolved = rtems_rtl_unresolved_unprotected ();
if (unresolved)
{
/*
@@ -251,9 +251,9 @@ rtems_rtl_unresolved_compact (void)
rtems_chain_node* node = rtems_chain_last (&unresolved->blocks);
while (!rtems_chain_is_head (&unresolved->blocks, node))
{
- rtems_chain_node* prev = rtems_chain_previous (node);
- rtems_rtl_unresolv_block_t* block = (rtems_rtl_unresolv_block_t*) node;
- rtems_rtl_unresolv_rec_t* rec = rtems_rtl_unresolved_rec_first (block);
+ rtems_chain_node* prev = rtems_chain_previous (node);
+ rtems_rtl_unresolv_block* block = (rtems_rtl_unresolv_block*) node;
+ rtems_rtl_unresolv_rec* rec = rtems_rtl_unresolved_rec_first (block);
while (!rtems_rtl_unresolved_rec_is_last (block, rec))
{
@@ -295,8 +295,8 @@ rtems_rtl_unresolved_compact (void)
}
bool
-rtems_rtl_unresolved_table_open (rtems_rtl_unresolved_t* unresolved,
- size_t block_recs)
+rtems_rtl_unresolved_table_open (rtems_rtl_unresolved* unresolved,
+ size_t block_recs)
{
unresolved->marker = 0xdeadf00d;
unresolved->block_recs = block_recs;
@@ -305,7 +305,7 @@ rtems_rtl_unresolved_table_open (rtems_rtl_unresolved_t* unresolved,
}
void
-rtems_rtl_unresolved_table_close (rtems_rtl_unresolved_t* unresolved)
+rtems_rtl_unresolved_table_close (rtems_rtl_unresolved* unresolved)
{
rtems_chain_node* node = rtems_chain_first (&unresolved->blocks);
while (!rtems_chain_is_tail (&unresolved->blocks, node))
@@ -317,17 +317,17 @@ rtems_rtl_unresolved_table_close (rtems_rtl_unresolved_t* unresolved)
}
bool
-rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator_t iterator,
- void* data)
+rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator iterator,
+ void* data)
{
- rtems_rtl_unresolved_t* unresolved = rtems_rtl_unresolved ();
+ rtems_rtl_unresolved* unresolved = rtems_rtl_unresolved_unprotected ();
if (unresolved)
{
rtems_chain_node* node = rtems_chain_first (&unresolved->blocks);
while (!rtems_chain_is_tail (&unresolved->blocks, node))
{
- rtems_rtl_unresolv_block_t* block = (rtems_rtl_unresolv_block_t*) node;
- rtems_rtl_unresolv_rec_t* rec = rtems_rtl_unresolved_rec_first (block);
+ rtems_rtl_unresolv_block* block = (rtems_rtl_unresolv_block*) node;
+ rtems_rtl_unresolv_rec* rec = rtems_rtl_unresolved_rec_first (block);
while (!rtems_rtl_unresolved_rec_is_last (block, rec))
{
@@ -343,24 +343,24 @@ rtems_rtl_unresolved_interate (rtems_rtl_unresolved_iterator_t iterator,
}
bool
-rtems_rtl_unresolved_add (rtems_rtl_obj_t* obj,
- const uint16_t flags,
- const char* name,
- const uint16_t sect,
- const rtems_rtl_word_t* rel)
+rtems_rtl_unresolved_add (rtems_rtl_obj* obj,
+ const uint16_t flags,
+ const char* name,
+ const uint16_t sect,
+ const rtems_rtl_word* rel)
{
- rtems_rtl_unresolved_t* unresolved;
- rtems_chain_node* node;
- rtems_rtl_unresolv_block_t* block;
- rtems_rtl_unresolv_rec_t* rec;
- int name_index;
- size_t name_recs;
+ rtems_rtl_unresolved* unresolved;
+ rtems_chain_node* node;
+ rtems_rtl_unresolv_block* block;
+ rtems_rtl_unresolv_rec* rec;
+ int name_index;
+ size_t name_recs;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
printf ("rtl: unresolv: add: %s(s:%d) -> %s\n",
rtems_rtl_obj_oname (obj), sect, name);
- unresolved = rtems_rtl_unresolved ();
+ unresolved = rtems_rtl_unresolved_unprotected ();
if (!unresolved)
return false;
@@ -371,7 +371,7 @@ rtems_rtl_unresolved_add (rtems_rtl_obj_t* obj,
block = NULL;
while (!rtems_chain_is_tail (&unresolved->blocks, node))
{
- block = (rtems_rtl_unresolv_block_t*) node;
+ block = (rtems_rtl_unresolv_block*) node;
if (block->recs < unresolved->block_recs)
break;
block = NULL;
@@ -397,7 +397,7 @@ rtems_rtl_unresolved_add (rtems_rtl_obj_t* obj,
*/
if (name_index < 0)
{
- rtems_rtl_unresolv_block_t* name_block = block;
+ rtems_rtl_unresolv_block* name_block = block;
/*
* Is there enough room to fit the name ? It not add a new block.
@@ -447,7 +447,7 @@ rtems_rtl_unresolved_add (rtems_rtl_obj_t* obj,
void
rtems_rtl_unresolved_resolve (void)
{
- rtems_rtl_unresolved_reloc_data_t rd;
+ rtems_rtl_unresolved_reloc_data rd;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
printf ("rtl: unresolv: global resolve\n");
rd.name = 0;
@@ -458,15 +458,14 @@ rtems_rtl_unresolved_resolve (void)
}
bool
-rtems_rtl_unresolved_remove (rtems_rtl_obj_t* obj,
- const char* name,
- const uint16_t sect,
- const rtems_rtl_word_t* rel)
+rtems_rtl_unresolved_remove (rtems_rtl_obj* obj,
+ const char* name,
+ const uint16_t sect,
+ const rtems_rtl_word* rel)
{
- rtems_rtl_unresolved_t* unresolved;
- unresolved = rtems_rtl_unresolved ();
+ rtems_rtl_unresolved* unresolved;
+ unresolved = rtems_rtl_unresolved_unprotected ();
if (!unresolved)
return false;
return false;
}
-
diff --git a/cpukit/libdl/rtl-unwind-dw2.c b/cpukit/libdl/rtl-unwind-dw2.c
index d9237c5b7e..29525db213 100644
--- a/cpukit/libdl/rtl-unwind-dw2.c
+++ b/cpukit/libdl/rtl-unwind-dw2.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012-2016 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012-2016, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -35,9 +35,9 @@ void __register_frame (void *begin);
void __deregister_frame (void *begin);
bool
-rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags)
+rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags)
{
return
((flags & RTEMS_RTL_OBJ_SECT_CONST) != 0) &&
@@ -46,9 +46,9 @@ rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj_t* obj,
}
bool
-rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj_t* obj)
+rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj* obj)
{
- rtems_rtl_obj_sect_t* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
+ rtems_rtl_obj_sect* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
if (sect != NULL && sect->size > 0 && sect->base != NULL)
{
@@ -58,9 +58,9 @@ rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj_t* obj)
return true;
}
-bool rtems_rtl_elf_unwind_dw2_deregister (const rtems_rtl_obj_t* obj)
+bool rtems_rtl_elf_unwind_dw2_deregister (const rtems_rtl_obj* obj)
{
- rtems_rtl_obj_sect_t* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
+ rtems_rtl_obj_sect* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
if (sect != NULL && sect->size > 0 && sect->base != NULL)
{
diff --git a/cpukit/libdl/rtl-unwind-dw2.h b/cpukit/libdl/rtl-unwind-dw2.h
index 55b97970c2..ef76a3771b 100644
--- a/cpukit/libdl/rtl-unwind-dw2.h
+++ b/cpukit/libdl/rtl-unwind-dw2.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2016 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2016, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -42,9 +42,9 @@ extern "C" {
* @retval true The section contains unwind information.
* @retval false The section does not contain unwind information.
*/
-bool rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags);
+bool rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags);
/**
* Architecture specific handler to add an object file's unwind information to
@@ -54,7 +54,7 @@ bool rtems_rtl_elf_unwind_dw2_parse (const rtems_rtl_obj_t* obj,
* @retval true The unwind information has been registered.
* @retval false The unwind information could not be registered.
*/
-bool rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj_t* obj);
+bool rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj* obj);
/**
* Architecture specific handler to remove an object file's unwind information
@@ -64,7 +64,7 @@ bool rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj_t* obj);
* @retval true The unwind information has been deregistered.
* @retval false The unwind information could not be deregistered.
*/
-bool rtems_rtl_elf_unwind_dw2_deregister (const rtems_rtl_obj_t* obj);
+bool rtems_rtl_elf_unwind_dw2_deregister (const rtems_rtl_obj* obj);
/**
* Read signed and unsigned LEB128 values.
diff --git a/cpukit/libdl/rtl-unwind.h b/cpukit/libdl/rtl-unwind.h
index f88787e1ba..36ec5c4a11 100644
--- a/cpukit/libdl/rtl-unwind.h
+++ b/cpukit/libdl/rtl-unwind.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2016 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2016, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -32,9 +32,9 @@ extern "C" {
* @retval true The section contains unwind information.
* @retval false The section does not contain unwind information.
*/
-bool rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
- const char* name,
- uint32_t flags);
+bool rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
+ const char* name,
+ uint32_t flags);
/**
* Architecture specific handler to add an object file's unwind information to
@@ -44,7 +44,7 @@ bool rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
* @retval true The unwind information has been registered.
* @retval false The unwind information could not be registered.
*/
-bool rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj);
+bool rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj);
/**
* Architecture specific handler to remove an object file's unwind information
@@ -54,7 +54,7 @@ bool rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj);
* @retval true The unwind information has been deregistered.
* @retval false The unwind information could not be deregistered.
*/
-bool rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj);
+bool rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/rtl.c b/cpukit/libdl/rtl.c
index 36641ea83c..628fc771bc 100644
--- a/cpukit/libdl/rtl.c
+++ b/cpukit/libdl/rtl.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2012 Chris Johns <chrisj at rtems.org>
+ * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj at rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -54,8 +54,8 @@
/**
* Static RTL data is returned to the user when the linker is locked.
*/
-static rtems_rtl_data_t* rtl;
-static bool rtl_data_init;
+static rtems_rtl_data* rtl;
+static bool rtl_data_init;
/**
* Define a default base global symbol loader function that is weak
@@ -101,7 +101,7 @@ rtems_rtl_data_init (void)
/*
* Always in the heap.
*/
- rtl = malloc (sizeof (rtems_rtl_data_t));
+ rtl = malloc (sizeof (rtems_rtl_data));
if (!rtl)
{
rtems_libio_unlock ();
@@ -109,7 +109,7 @@ rtems_rtl_data_init (void)
return false;
}
- *rtl = (rtems_rtl_data_t) { 0 };
+ *rtl = (rtems_rtl_data) { 0 };
/*
* The initialise the allocator data.
@@ -230,13 +230,13 @@ rtems_rtl_data_init (void)
return true;
}
-rtems_rtl_data_t*
-rtems_rtl_data (void)
+rtems_rtl_data*
+rtems_rtl_data_unprotected (void)
{
return rtl;
}
-rtems_rtl_symbols_t*
+rtems_rtl_symbols*
rtems_rtl_global_symbols (void)
{
if (!rtl)
@@ -247,8 +247,8 @@ rtems_rtl_global_symbols (void)
return &rtl->globals;
}
-rtems_rtl_unresolved_t*
-rtems_rtl_unresolved (void)
+rtems_rtl_unresolved*
+rtems_rtl_unresolved_unprotected (void)
{
if (!rtl)
{
@@ -259,9 +259,9 @@ rtems_rtl_unresolved (void)
}
void
-rtems_rtl_obj_caches (rtems_rtl_obj_cache_t** symbols,
- rtems_rtl_obj_cache_t** strings,
- rtems_rtl_obj_cache_t** relocs)
+rtems_rtl_obj_caches (rtems_rtl_obj_cache** symbols,
+ rtems_rtl_obj_cache** strings,
+ rtems_rtl_obj_cache** relocs)
{
if (!rtl)
{
@@ -295,11 +295,11 @@ rtems_rtl_obj_caches_flush (void)
}
void
-rtems_rtl_obj_comp (rtems_rtl_obj_comp_t** decomp,
- rtems_rtl_obj_cache_t* cache,
- int fd,
- int compression,
- off_t offset)
+rtems_rtl_obj_decompress (rtems_rtl_obj_comp** decomp,
+ rtems_rtl_obj_cache* cache,
+ int fd,
+ int compression,
+ off_t offset)
{
if (!rtl)
{
@@ -312,7 +312,7 @@ rtems_rtl_obj_comp (rtems_rtl_obj_comp_t** decomp,
}
}
-rtems_rtl_data_t*
+rtems_rtl_data*
rtems_rtl_lock (void)
{
if (!rtems_rtl_data_init ())
@@ -329,10 +329,10 @@ rtems_rtl_unlock (void)
rtems_recursive_mutex_unlock (&rtl->lock);
}
-rtems_rtl_obj_t*
+rtems_rtl_obj*
rtems_rtl_check_handle (void* handle)
{
- rtems_rtl_obj_t* obj;
+ rtems_rtl_obj* obj;
rtems_chain_node* node;
obj = handle;
@@ -340,7 +340,7 @@ rtems_rtl_check_handle (void* handle)
while (!rtems_chain_is_tail (&rtl->objects, node))
{
- rtems_rtl_obj_t* check = (rtems_rtl_obj_t*) node;
+ rtems_rtl_obj* check = (rtems_rtl_obj*) node;
if (check == obj)
return obj;
node = rtems_chain_next (node);
@@ -349,11 +349,11 @@ rtems_rtl_check_handle (void* handle)
return NULL;
}
-rtems_rtl_obj_t*
+rtems_rtl_obj*
rtems_rtl_find_obj (const char* name)
{
rtems_chain_node* node;
- rtems_rtl_obj_t* found = NULL;
+ rtems_rtl_obj* found = NULL;
const char* aname = NULL;
const char* oname = NULL;
off_t ooffset;
@@ -365,7 +365,7 @@ rtems_rtl_find_obj (const char* name)
while (!rtems_chain_is_tail (&rtl->objects, node))
{
- rtems_rtl_obj_t* obj = (rtems_rtl_obj_t*) node;
+ rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
if ((aname == NULL && strcmp (obj->oname, oname) == 0) ||
(aname != NULL &&
strcmp (obj->aname, aname) == 0 && strcmp (obj->oname, oname) == 0))
@@ -385,10 +385,10 @@ rtems_rtl_find_obj (const char* name)
return found;
}
-rtems_rtl_obj_t*
+rtems_rtl_obj*
rtems_rtl_load_object (const char* name, int mode)
{
- rtems_rtl_obj_t* obj;
+ rtems_rtl_obj* obj;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD))
printf ("rtl: loading '%s'\n", name);
@@ -464,7 +464,7 @@ rtems_rtl_load_object (const char* name, int mode)
}
bool
-rtems_rtl_unload_object (rtems_rtl_obj_t* obj)
+rtems_rtl_unload_object (rtems_rtl_obj* obj)
{
bool ok = true;
@@ -505,7 +505,7 @@ rtems_rtl_unload_object (rtems_rtl_obj_t* obj)
}
void
-rtems_rtl_run_ctors (rtems_rtl_obj_t* obj)
+rtems_rtl_run_ctors (rtems_rtl_obj* obj)
{
rtems_rtl_obj_run_ctors (obj);
}
@@ -615,7 +615,7 @@ rtems_rtl_base_sym_global_add (const unsigned char* esyms,
rtems_rtl_unlock ();
}
-rtems_rtl_obj_t*
+rtems_rtl_obj*
rtems_rtl_baseimage (void)
{
return NULL;
--
2.15.1
More information about the devel
mailing list