summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-03-28 17:23:05 +1100
committerChris Johns <chrisj@rtems.org>2017-04-04 13:26:01 +1000
commitd2e31f70c12f6363cef79ffad781df6ec0acdfb5 (patch)
tree3ebf30b9233ccfbff397ef245f3b74f1f2bd69dd
parentdosfs: Fix file name search (diff)
downloadrtems-d2e31f70c12f6363cef79ffad781df6ec0acdfb5.tar.bz2
libdl: Back port C++ exception throw and catch from 4.12.
Closes #2956.
-rw-r--r--cpukit/Makefile.am2
-rw-r--r--cpukit/libdl/Makefile.am1
-rw-r--r--cpukit/libdl/dlfcn.c2
-rw-r--r--cpukit/libdl/include/arch/arm/machine/elf_machdep.h3
-rw-r--r--cpukit/libdl/include/sys/exec_elf.h10
-rw-r--r--cpukit/libdl/rap.c1
-rw-r--r--cpukit/libdl/rtl-allocator.c26
-rw-r--r--cpukit/libdl/rtl-allocator.h7
-rw-r--r--cpukit/libdl/rtl-debugger.c14
-rw-r--r--cpukit/libdl/rtl-elf.c106
-rw-r--r--cpukit/libdl/rtl-elf.h26
-rw-r--r--cpukit/libdl/rtl-error.c17
-rw-r--r--cpukit/libdl/rtl-mdreloc-arm.c124
-rw-r--r--cpukit/libdl/rtl-mdreloc-bfin.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-h8300.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-i386.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-lm32.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-m68k.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-mips.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-moxie.c29
-rw-r--r--cpukit/libdl/rtl-mdreloc-powerpc.c44
-rw-r--r--cpukit/libdl/rtl-mdreloc-sparc.c49
-rw-r--r--cpukit/libdl/rtl-mdreloc-v850.c29
-rw-r--r--cpukit/libdl/rtl-obj.c333
-rw-r--r--cpukit/libdl/rtl-obj.h181
-rw-r--r--cpukit/libdl/rtl-rap.c55
-rw-r--r--cpukit/libdl/rtl-rap.h7
-rw-r--r--cpukit/libdl/rtl-shell.c2
-rw-r--r--cpukit/libdl/rtl-unwind-dw2.c71
-rw-r--r--cpukit/libdl/rtl-unwind-dw2.h83
-rw-r--r--cpukit/libdl/rtl-unwind.h63
-rw-r--r--cpukit/libdl/rtl.c33
-rw-r--r--cpukit/libdl/rtl.h2
-rw-r--r--cpukit/preinstall.am4
-rw-r--r--testsuites/libtests/Makefile.am2
-rw-r--r--testsuites/libtests/configure.ac3
-rw-r--r--testsuites/libtests/dl01/dl01.scn12
-rw-r--r--testsuites/libtests/dl01/init.c3
-rw-r--r--testsuites/libtests/dl02/dl02.scn16
-rw-r--r--testsuites/libtests/dl02/init.c2
-rw-r--r--testsuites/libtests/dl03/Makefile.am19
-rw-r--r--testsuites/libtests/dl03/dl-cache.c296
-rw-r--r--testsuites/libtests/dl03/dl-cache.h14
-rw-r--r--testsuites/libtests/dl03/dl03.doc28
-rw-r--r--testsuites/libtests/dl03/dl03.scn69
-rw-r--r--testsuites/libtests/dl03/init.c67
-rw-r--r--testsuites/libtests/dl04/Makefile.am50
-rw-r--r--testsuites/libtests/dl04/dl-cpp.cpp4
-rw-r--r--testsuites/libtests/dl04/dl-load.c37
-rw-r--r--testsuites/libtests/dl04/dl-load.h14
-rw-r--r--testsuites/libtests/dl04/dl-o4.cpp30
-rw-r--r--testsuites/libtests/dl04/dl04.doc21
-rw-r--r--testsuites/libtests/dl04/dl04.scn1004
-rw-r--r--testsuites/libtests/dl04/init.c84
-rw-r--r--testsuites/libtests/dl05/Makefile.am50
-rw-r--r--testsuites/libtests/dl05/dl-cpp.cpp30
-rw-r--r--testsuites/libtests/dl05/dl-load.c63
-rw-r--r--testsuites/libtests/dl05/dl-load.h51
-rw-r--r--testsuites/libtests/dl05/dl-o5.cpp28
-rw-r--r--testsuites/libtests/dl05/dl05.doc24
-rw-r--r--testsuites/libtests/dl05/dl05.scn1424
-rw-r--r--testsuites/libtests/dl05/init.c86
62 files changed, 4754 insertions, 275 deletions
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index c9a4e0f506..c3f151bd39 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -90,7 +90,7 @@ include_rtems_rtl_HEADERS += libdl/dlfcn-shell.h
include_rtems_rtl_HEADERS += libdl/rtl.h libdl/rtl-allocator.h libdl/rtl-obj-fwd.h
include_rtems_rtl_HEADERS += libdl/rtl-fwd.h libdl/rtl-obj.h libdl/rtl-obj-cache.h
include_rtems_rtl_HEADERS += libdl/rtl-obj-comp.h libdl/rtl-unresolved.h
-include_rtems_rtl_HEADERS += libdl/rtl-indirect-ptr.h libdl/rtl-sym.h
+include_rtems_rtl_HEADERS += libdl/rtl-indirect-ptr.h libdl/rtl-sym.h libdl/rtl-trace.h
include_rtems_rtl_HEADERS += libdl/rap.h libdl/rap-shell.h
endif
diff --git a/cpukit/libdl/Makefile.am b/cpukit/libdl/Makefile.am
index 5c3cd15475..b21c16750a 100644
--- a/cpukit/libdl/Makefile.am
+++ b/cpukit/libdl/Makefile.am
@@ -25,6 +25,7 @@ libdl_a_SOURCES = \
rtl-string.c \
rtl-sym.c \
rtl-trace.c \
+ rtl-unwind-dw2.c \
rtl-unresolved.c
libdl_a_SOURCES += rtl-mdreloc-@RTEMS_CPU@.c
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 19feaafd26..3b31bb2e8e 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -130,7 +130,7 @@ dlerror (void)
{
static char msg[64];
rtems_rtl_get_error (msg, sizeof (msg));
- return msg;
+ return msg;
}
int
diff --git a/cpukit/libdl/include/arch/arm/machine/elf_machdep.h b/cpukit/libdl/include/arch/arm/machine/elf_machdep.h
index 78c88b5af8..8f01d05212 100644
--- a/cpukit/libdl/include/arch/arm/machine/elf_machdep.h
+++ b/cpukit/libdl/include/arch/arm/machine/elf_machdep.h
@@ -80,7 +80,8 @@
#define R_ARM_ALU_SBREL_19_12 36
#define R_ARM_ALU_SBREL_27_20 37
#define R_ARM_V4BX 40
-#define R_ARM_PREL31 41
+#define R_ARM_TARGET2 41
+#define R_ARM_PREL31 42
#define R_ARM_MOVW_ABS_NC 43
#define R_ARM_MOVT_ABS 44
diff --git a/cpukit/libdl/include/sys/exec_elf.h b/cpukit/libdl/include/sys/exec_elf.h
index 08da7e809e..4242415f54 100644
--- a/cpukit/libdl/include/sys/exec_elf.h
+++ b/cpukit/libdl/include/sys/exec_elf.h
@@ -459,6 +459,10 @@ typedef struct {
#define SHF_WRITE 0x1 /* Section contains writable data */
#define SHF_ALLOC 0x2 /* Section occupies memory */
#define SHF_EXECINSTR 0x4 /* Section contains executable insns */
+#define SHF_MERGE 0x10 /* Section contains data that can be merged */
+#define SHF_STRINGS 0x20 /* Section contains null-terminated strings */
+#define SHF_INFO_LINK 0x40 /* Section header's sh_info holds table index */
+#define SHF_LINK_ORDER 0x80 /* Section has special ordering requirements */
#define SHF_MASKOS 0x0f000000 /* Operating system specific values */
#define SHF_MASKPROC 0xf0000000 /* Processor-specific values */
@@ -949,13 +953,13 @@ typedef struct {
#define SYMINFO_NUM 2
/*
- * These constants are used for Elf32_Verdef struct's version number.
+ * These constants are used for Elf32_Verdef struct's version number.
*/
#define VER_DEF_NONE 0
#define VER_DEF_CURRENT 1
/*
- * These constants are used for Elf32_Verdef struct's vd_flags.
+ * These constants are used for Elf32_Verdef struct's vd_flags.
*/
#define VER_FLG_BASE 0x1
#define VER_FLG_WEAK 0x2
@@ -967,7 +971,7 @@ typedef struct {
#define VER_NDX_GLOBAL 1
/*
- * These constants are used for Elf32_Verneed struct's version number.
+ * These constants are used for Elf32_Verneed struct's version number.
*/
#define VER_NEED_NONE 0
#define VER_NEED_CURRENT 1
diff --git a/cpukit/libdl/rap.c b/cpukit/libdl/rap.c
index 4e07c5472e..87b3bc36e5 100644
--- a/cpukit/libdl/rap.c
+++ b/cpukit/libdl/rap.c
@@ -19,6 +19,7 @@
#include "config.h"
#endif
+#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/cpukit/libdl/rtl-allocator.c b/cpukit/libdl/rtl-allocator.c
index 988094060f..39b4bcd1d0 100644
--- a/cpukit/libdl/rtl-allocator.c
+++ b/cpukit/libdl/rtl-allocator.c
@@ -152,6 +152,7 @@ rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag_t tag,
bool
rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
void** const_base, size_t const_size,
+ void** eh_base, size_t eh_size,
void** data_base, size_t data_size,
void** bss_base, size_t bss_size)
{
@@ -173,7 +174,20 @@ rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
const_size, false);
if (!*const_base)
{
- rtems_rtl_alloc_module_del (text_base, const_base, data_base, bss_base);
+ rtems_rtl_alloc_module_del (text_base, const_base, eh_base,
+ data_base, bss_base);
+ return false;
+ }
+ }
+
+ if (eh_size)
+ {
+ *eh_base = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_READ,
+ eh_size, false);
+ if (!*eh_base)
+ {
+ rtems_rtl_alloc_module_del (text_base, const_base, eh_base,
+ data_base, bss_base);
return false;
}
}
@@ -184,7 +198,8 @@ rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
data_size, false);
if (!*data_base)
{
- rtems_rtl_alloc_module_del (text_base, const_base, data_base, bss_base);
+ rtems_rtl_alloc_module_del (text_base, const_base, eh_base,
+ data_base, bss_base);
return false;
}
}
@@ -195,7 +210,8 @@ rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
bss_size, false);
if (!*bss_base)
{
- rtems_rtl_alloc_module_del (text_base, const_base, data_base, bss_base);
+ rtems_rtl_alloc_module_del (text_base, const_base, eh_base,
+ data_base, bss_base);
return false;
}
}
@@ -206,12 +222,14 @@ rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
void
rtems_rtl_alloc_module_del (void** text_base,
void** const_base,
+ void** eh_base,
void** data_base,
void** bss_base)
{
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_READ_WRITE, *bss_base);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_READ_WRITE, *data_base);
+ rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_READ, *eh_base);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_READ, *const_base);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_READ_EXEC, *text_base);
- *text_base = *const_base = *data_base = *bss_base = NULL;
+ *text_base = *const_base = *eh_base = *data_base = *bss_base = NULL;
}
diff --git a/cpukit/libdl/rtl-allocator.h b/cpukit/libdl/rtl-allocator.h
index 4d996d3ccd..e8044ee1e8 100644
--- a/cpukit/libdl/rtl-allocator.h
+++ b/cpukit/libdl/rtl-allocator.h
@@ -146,6 +146,8 @@ void rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag_t tag,
* @param text_size The size of the read/exec section.
* @param const_base Pointer to the const base pointer.
* @param const_size The size of the read only section.
+ * @param eh_base Pointer to the eh base pointer.
+ * @param eh_size The size of the eh section.
* @param data_base Pointer to the data base pointer.
* @param data_size The size of the read/write secton.
* @param bss_base Pointer to the bss base pointer.
@@ -155,6 +157,7 @@ void rtems_rtl_alloc_indirect_del (rtems_rtl_alloc_tag_t tag,
*/
bool rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
void** const_base, size_t const_size,
+ void** eh_base, size_t eh_size,
void** data_base, size_t data_size,
void** bss_base, size_t bss_size);
@@ -163,11 +166,13 @@ bool rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
*
* @param text_base Pointer to the text base pointer.
* @param const_base Pointer to the const base pointer.
+ * @param eh_base Pointer to the eh base pointer.
* @param data_base Pointer to the data base pointer.
* @param bss_base Pointer to the bss base pointer.
*/
void rtems_rtl_alloc_module_del (void** text_base, void** const_base,
- void** data_base, void** bss_base);
+ void** eh_base, void** data_base,
+ void** bss_base);
#ifdef __cplusplus
}
diff --git a/cpukit/libdl/rtl-debugger.c b/cpukit/libdl/rtl-debugger.c
index 63add5956e..afbea8ab44 100644
--- a/cpukit/libdl/rtl-debugger.c
+++ b/cpukit/libdl/rtl-debugger.c
@@ -45,10 +45,10 @@ _rtld_debug_state (void)
int
_rtld_linkmap_add (rtems_rtl_obj_t* obj)
{
- struct link_map* l = (struct link_map*)obj->detail;
+ struct link_map* l = obj->linkmap;
struct link_map* prev;
- uint32_t obj_num = obj->obj_num;
- int i;
+ uint32_t obj_num = obj->obj_num;
+ int i;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
printf ("rtl: linkmap_add\n");
@@ -78,8 +78,10 @@ _rtld_linkmap_add (rtems_rtl_obj_t* obj)
void
_rtld_linkmap_delete (rtems_rtl_obj_t* obj)
{
- struct link_map* l = (struct link_map*)obj->detail;
- /* link_maps are allocated together if not 1 */
+ struct link_map* l = obj->linkmap;
+ /*
+ * link_maps are allocated together if not 1
+ */
struct link_map* e = l + obj->obj_num - 1;
while (e && e->l_next) e = e->l_next;
@@ -90,7 +92,7 @@ _rtld_linkmap_delete (rtems_rtl_obj_t* obj)
e->l_next->l_prev = NULL;
return;
}
+
if ((l->l_prev->l_next = e->l_next) != NULL)
e->l_next->l_prev = l->l_prev;
- return;
}
diff --git a/cpukit/libdl/rtl-elf.c b/cpukit/libdl/rtl-elf.c
index b686a4812f..be2f06a7ba 100644
--- a/cpukit/libdl/rtl-elf.c
+++ b/cpukit/libdl/rtl-elf.c
@@ -30,6 +30,7 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
#include "rtl-unresolved.h"
/**
@@ -169,6 +170,9 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
&relbuf[0], reloc_size))
return false;
+ /*
+ * Read the symbol details.
+ */
if (is_rela)
off = (obj->ooffset + symsect->offset +
(ELF_R_SYM (rela->r_info) * sizeof (sym)));
@@ -246,7 +250,7 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
if (is_rela)
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
- printf ("rtl: rela: sym:%s(%-2d)=%08lx type:%-2d off:%08lx addend:%d\n",
+ printf ("rtl: rela: sym:%s(%d)=%08lx type:%d off:%08lx addend:%d\n",
symname, (int) ELF_R_SYM (rela->r_info), symvalue,
(int) ELF_R_TYPE (rela->r_info), rela->r_offset, (int) rela->r_addend);
if (!rtems_rtl_elf_relocate_rela (obj, rela, targetsect,
@@ -256,7 +260,7 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj,
else
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
- printf ("rtl: rel: sym:%s(%-2d)=%08lx type:%-2d off:%08lx\n",
+ printf ("rtl: rel: sym:%s(%d)=%08lx type:%d off:%08lx\n",
symname, (int) ELF_R_SYM (rel->r_info), symvalue,
(int) ELF_R_TYPE (rel->r_info), rel->r_offset);
if (!rtems_rtl_elf_relocate_rel (obj, rel, targetsect,
@@ -300,7 +304,7 @@ rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
rela.r_info = reloc->rel[REL_R_INFO];
rela.r_addend = reloc->rel[REL_R_ADDEND];
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
- printf ("rtl: rela: sym:%-2d type:%-2d off:%08lx addend:%d\n",
+ printf ("rtl: rela: sym:%d type:%d off:%08lx addend:%d\n",
(int) ELF_R_SYM (rela.r_info), (int) ELF_R_TYPE (rela.r_info),
rela.r_offset, (int) rela.r_addend);
if (!rtems_rtl_elf_relocate_rela (reloc->obj, &rela, sect,
@@ -313,7 +317,7 @@ rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc,
rel.r_offset = reloc->rel[REL_R_OFFSET];
rel.r_info = reloc->rel[REL_R_INFO];
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
- printf ("rtl: rel: sym:%-2d type:%-2d off:%08lx\n",
+ printf ("rtl: rel: sym:%d type:%d off:%08lx\n",
(int) ELF_R_SYM (rel.r_info), (int) ELF_R_TYPE (rel.r_info),
rel.r_offset);
if (!rtems_rtl_elf_relocate_rel (reloc->obj, &rel, sect,
@@ -652,6 +656,11 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
flags = 0;
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
+ printf ("rtl: section: %2d: type=%d flags=%08x link=%d info=%d\n",
+ section, (int) shdr.sh_type, (unsigned int) shdr.sh_flags,
+ (int) shdr.sh_link, (int) shdr.sh_info);
+
switch (shdr.sh_type)
{
case SHT_NULL:
@@ -707,9 +716,16 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
break;
default:
- if (rtems_rtl_trace (RTEMS_RTL_TRACE_WARNING))
- printf ("rtl: unsupported section: %2d: type=%02d flags=%02x\n",
- section, (int) shdr.sh_type, (int) shdr.sh_flags);
+ /*
+ * See if there are architecture specific flags?
+ */
+ flags = rtems_rtl_elf_section_flags (obj, &shdr);
+ if (flags == 0)
+ {
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_WARNING))
+ printf ("rtl: unsupported section: %2d: type=%02d flags=%02x\n",
+ section, (int) shdr.sh_type, (int) shdr.sh_flags);
+ }
break;
}
@@ -718,6 +734,13 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
char* name;
size_t len;
+ /*
+ * If link ordering this section must appear in the same order in memory
+ * as the linked-to section relative to the sections it loads with.
+ */
+ if ((shdr.sh_flags & SHF_LINK_ORDER) != 0)
+ flags |= RTEMS_RTL_OBJ_SECT_LINK;
+
len = RTEMS_RTL_ELF_STRING_MAX;
if (!rtems_rtl_obj_cache_read (strings, fd,
sectstroff + shdr.sh_name,
@@ -729,6 +752,12 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr)
if (strcmp (".dtors", name) == 0)
flags |= RTEMS_RTL_OBJ_SECT_DTOR;
+ if (rtems_rtl_elf_unwind_parse (obj, name, flags))
+ {
+ flags &= ~(RTEMS_RTL_OBJ_SECT_TEXT | RTEMS_RTL_OBJ_SECT_CONST);
+ flags |= RTEMS_RTL_OBJ_SECT_EH;
+ }
+
if (!rtems_rtl_obj_add_section (obj, section, name,
shdr.sh_size, shdr.sh_offset,
shdr.sh_addralign, shdr.sh_link,
@@ -771,16 +800,19 @@ rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd)
return true;
}
-bool rtems_rtl_elf_load_details (rtems_rtl_obj_t* obj)
+static bool
+rtems_rtl_elf_load_linkmap (rtems_rtl_obj_t* obj)
{
rtems_chain_control* sections = NULL;
rtems_chain_node* node = NULL;
size_t mask = 0;
- struct link_map* l = NULL;
int sec_num = 0;
+ section_detail* sd;
int i = 0;
- /* caculate the size of sections' name. */
+ /*
+ * Caculate the size of sections' name.
+ */
for (mask = RTEMS_RTL_OBJ_SECT_TEXT;
mask <= RTEMS_RTL_OBJ_SECT_BSS;
@@ -791,7 +823,6 @@ bool rtems_rtl_elf_load_details (rtems_rtl_obj_t* obj)
while (!rtems_chain_is_tail (sections, node))
{
rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
-
if ((sect->size != 0) && ((sect->flags & mask) != 0))
{
++sec_num;
@@ -801,32 +832,31 @@ bool rtems_rtl_elf_load_details (rtems_rtl_obj_t* obj)
}
obj->obj_num = 1;
- obj->detail = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
- sizeof(struct link_map) +
- sec_num * sizeof (section_detail), true);
- if (!obj->detail)
+ obj->linkmap = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
+ sizeof(struct link_map) +
+ sec_num * sizeof (section_detail), true);
+ if (!obj->linkmap)
{
- rtems_rtl_set_error (ENOMEM, "no memory for obj global syms");
+ rtems_rtl_set_error (ENOMEM, "no memory for obj linkmap");
return false;
}
- l = (struct link_map*) obj->detail;
- l->name = obj->oname;
- l->sec_num = sec_num;
- l->sec_detail = (section_detail*) (l + 1);
- l->rpathlen = 0;
- l->rpath = NULL;
- l->l_next = NULL;
- l->l_prev = NULL;
- l->sec_addr[rap_text] = obj->text_base;
- l->sec_addr[rap_const] = obj->const_base;
- l->sec_addr[rap_data] = obj->data_base;
- l->sec_addr[rap_bss] = obj->bss_base;
-
-
- section_detail* sd = l->sec_detail;
+ obj->linkmap->name = obj->oname;
+ obj->linkmap->sec_num = sec_num;
+ obj->linkmap->sec_detail = (section_detail*) (obj->linkmap + 1);
+ obj->linkmap->rpathlen = 0;
+ obj->linkmap->rpath = NULL;
+ obj->linkmap->l_next = NULL;
+ obj->linkmap->l_prev = NULL;
+ obj->linkmap->sec_addr[rap_text] = obj->text_base;
+ obj->linkmap->sec_addr[rap_const] = obj->const_base;
+ obj->linkmap->sec_addr[rap_data] = obj->data_base;
+ obj->linkmap->sec_addr[rap_bss] = obj->bss_base;
+
+ sd = obj->linkmap->sec_detail;
sections = &obj->sections;
node = rtems_chain_first (sections);
+
for (mask = RTEMS_RTL_OBJ_SECT_TEXT;
mask <= RTEMS_RTL_OBJ_SECT_BSS;
mask <<= 1)
@@ -948,7 +978,12 @@ rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd)
rtems_rtl_symbol_obj_erase_local (obj);
- if (!rtems_rtl_elf_load_details (obj))
+ if (!rtems_rtl_elf_load_linkmap (obj))
+ {
+ return false;
+ }
+
+ if (!rtems_rtl_elf_unwind_register (obj))
{
return false;
}
@@ -956,6 +991,13 @@ rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd)
return true;
}
+bool
+rtems_rtl_elf_file_unload (rtems_rtl_obj_t* obj)
+{
+ rtems_rtl_elf_unwind_deregister (obj);
+ return true;
+}
+
rtems_rtl_loader_format_t*
rtems_rtl_elf_file_sig (void)
{
diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h
index 7f6ea300a3..e3ac07f7ed 100644
--- a/cpukit/libdl/rtl-elf.h
+++ b/cpukit/libdl/rtl-elf.h
@@ -55,6 +55,18 @@ extern "C" {
#define RTEMS_RTL_ELF_STRING_MAX (256)
/**
+ * Architecture specific handler to translate unknown section flags to RTL
+ * section flags.
+ *
+ * @param obj The object file being relocated.
+ * @param shdr The ELF section header.
+ * @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);
+
+/**
* Architecture specific handler to check is a relocation record's type is
* required to resolve a symbol.
*
@@ -137,13 +149,6 @@ bool rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj,
bool rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd);
/**
- * The ELF file details handler.
- *
- * @param obj Load the details of the obj.
- */
-bool rtems_rtl_elf_load_details (rtems_rtl_obj_t* obj);
-
-/**
* The ELF format load handler.
*
* @param obj The object to load.
@@ -152,6 +157,13 @@ bool rtems_rtl_elf_load_details (rtems_rtl_obj_t* obj);
bool rtems_rtl_elf_file_load (rtems_rtl_obj_t* 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);
+
+/**
* The ELF format signature handler.
*
* @return rtems_rtl_loader_format_t* The format's signature.
diff --git a/cpukit/libdl/rtl-error.c b/cpukit/libdl/rtl-error.c
index 3251fa5392..5ec4b26ef7 100644
--- a/cpukit/libdl/rtl-error.c
+++ b/cpukit/libdl/rtl-error.c
@@ -17,6 +17,7 @@
#include "config.h"
#endif
+#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
@@ -39,9 +40,15 @@ int
rtems_rtl_get_error (char* message, size_t max_message)
{
rtems_rtl_data_t* rtl = rtems_rtl_lock ();
- int last_errno = rtl->last_errno;
- strncpy (message, rtl->last_error, sizeof (rtl->last_error));
- rtems_rtl_unlock ();
- return last_errno;
-}
+ if (rtl != NULL)
+ {
+ int last_errno = rtl->last_errno;
+ strncpy (message, rtl->last_error, sizeof (rtl->last_error));
+ rtems_rtl_unlock ();
+ return last_errno;
+ }
+ strncpy(message, "RTL init error", max_message);
+
+ return EIO;
+}
diff --git a/cpukit/libdl/rtl-mdreloc-arm.c b/cpukit/libdl/rtl-mdreloc-arm.c
index 692c8297a8..f2f91f171c 100644
--- a/cpukit/libdl/rtl-mdreloc-arm.c
+++ b/cpukit/libdl/rtl-mdreloc-arm.c
@@ -10,11 +10,14 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <unwind.h>
+#include <unwind-arm-common.h>
#include <rtems/rtl/rtl.h>
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
/*
* It is possible for the compiler to emit relocations for unaligned data.
@@ -23,6 +26,8 @@
#define RELOC_ALIGNED_P(x) \
(((uintptr_t)(x) & (sizeof(void *) - 1)) == 0)
+#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
+
static inline Elf_Addr
load_ptr(void *where)
{
@@ -52,6 +57,24 @@ isThumb(Elf_Word symvalue)
else return false;
}
+static inline Elf_SOff
+sign_extend31(Elf_Addr val)
+{
+ if (0x40000000 & val)
+ val = ~((Elf_Addr)0x7fffffff) | (0x7fffffff & val);
+ return 0x7fffffff & val;
+}
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ uint32_t flags = 0;
+ if (shdr->sh_type == SHT_ARM_EXIDX)
+ flags = RTEMS_RTL_OBJ_SECT_EH | RTEMS_RTL_OBJ_SECT_LOAD;
+ return flags;
+}
+
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
{
@@ -87,8 +110,11 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
where = (Elf_Addr *)(sect->base + rel->r_offset);
switch (ELF_R_TYPE(rel->r_info)) {
- case R_TYPE(NONE):
- break;
+ case R_TYPE(NONE):
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) {
+ printf ("rtl: NONE %p in %s\n", where, rtems_rtl_obj_oname (obj));
+ }
+ break;
case R_TYPE(CALL): /* BL/BLX */
case R_TYPE(JUMP24): /* B/BL<cond> */
@@ -165,24 +191,32 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
case R_TYPE(REL32): /* word32 (S + A) | T - P */
case R_TYPE(ABS32): /* word32 (S + A) | T */
case R_TYPE(GLOB_DAT): /* word32 (S + A) | T */
+ case R_TYPE(PREL31): /* word32 (S + A) | T - P */
+ case R_TYPE(TARGET2): /* Equivalent to REL32 */
if (__predict_true(RELOC_ALIGNED_P(where))) {
tmp = *where + symvalue;
if (isThumb(symvalue))
tmp |= 1;
- if (ELF_R_TYPE(rel->r_info) == R_TYPE(REL32))
+ if (ELF_R_TYPE(rel->r_info) == R_TYPE(REL32) ||
+ ELF_R_TYPE(rel->r_info) == R_TYPE(TARGET2))
tmp -= (Elf_Addr)where;
+ else if (ELF_R_TYPE(rel->r_info) == R_TYPE(PREL31))
+ tmp = sign_extend31(tmp - (Elf_Addr)where);
*where = tmp;
} else {
tmp = load_ptr(where) + symvalue;
if (isThumb(symvalue))
tmp |= 1;
- if (ELF_R_TYPE(rel->r_info) == R_TYPE(REL32))
+ if (ELF_R_TYPE(rel->r_info) == R_TYPE(REL32) ||
+ ELF_R_TYPE(rel->r_info) == R_TYPE(TARGET2))
tmp -= (Elf_Addr)where;
+ else if (ELF_R_TYPE(rel->r_info) == R_TYPE(PREL31))
+ tmp = sign_extend31(tmp - (Elf_Addr)where);
store_ptr(where, tmp);
}
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
- printf ("rtl: REL32/ABS32/GLOB_DAT %p @ %p in %s",
+ printf ("rtl: REL32/ABS32/GLOB_DAT/PREL31/TARGET2 %p @ %p in %s\n",
(void *)tmp, where, rtems_rtl_obj_oname (obj));
break;
@@ -306,7 +340,7 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
(void *)*where, where, rtems_rtl_obj_oname (obj));
break;
- default:
+ default:
printf ("rtl: reloc unknown: sym = %lu, type = %lu, offset = %p, "
"contents = %p\n",
ELF_R_SYM(rel->r_info), (uint32_t) ELF_R_TYPE(rel->r_info),
@@ -315,9 +349,83 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
"%s: Unsupported relocation type %ld "
"in non-PLT relocations",
sect->name, (uint32_t) ELF_R_TYPE(rel->r_info));
- return false;
+ return false;
}
- return true;
+ return true;
+}
+
+bool
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* obj,
+ const char* name,
+ uint32_t flags)
+{
+ /*
+ * We location the EH sections in section flags.
+ */
+ return false;
}
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return true;
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+{
+ obj->loader = NULL;
+ return true;
+}
+
+/* An exception index table entry. */
+typedef struct __EIT_entry
+{
+ _uw fnoffset;
+ _uw content;
+} __EIT_entry;
+
+/* The exception index table location in the base module */
+extern __EIT_entry __exidx_start;
+extern __EIT_entry __exidx_end;
+
+/*
+ * A weak reference is in libgcc, provide a real version and provide a way to
+ * manage loaded modules.
+ *
+ * Passed in the return address and a reference to the number of records
+ * found. We set the start of the exidx data and the number of records.
+ */
+_Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
+ int* nrec) __attribute__ ((__noinline__,
+ __used__,
+ __noclone__));
+
+_Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
+ int* nrec)
+{
+ rtems_rtl_data_t* rtl;
+ rtems_chain_node* node;
+ __EIT_entry* exidx_start = &__exidx_start;
+ __EIT_entry* exidx_end = &__exidx_end;
+
+ rtl = rtems_rtl_lock ();
+
+ node = rtems_chain_first (&rtl->objects);
+ while (!rtems_chain_is_tail (&rtl->objects, node)) {
+ rtems_rtl_obj_t* obj = (rtems_rtl_obj_t*) 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);
+ break;
+ }
+ node = rtems_chain_next (node);
+ }
+
+ rtems_rtl_unlock ();
+
+ *nrec = exidx_end - exidx_start;
+
+ return (_Unwind_Ptr) exidx_start;
+}
diff --git a/cpukit/libdl/rtl-mdreloc-bfin.c b/cpukit/libdl/rtl-mdreloc-bfin.c
index d855d3061e..5a1fd26e3c 100644
--- a/cpukit/libdl/rtl-mdreloc-bfin.c
+++ b/cpukit/libdl/rtl-mdreloc-bfin.c
@@ -6,6 +6,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -113,3 +122,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 925601b7d2..0ef717bfb3 100644
--- a/cpukit/libdl/rtl-mdreloc-h8300.c
+++ b/cpukit/libdl/rtl-mdreloc-h8300.c
@@ -9,6 +9,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -99,3 +108,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 b6dd9b7306..c8f1e11c3e 100644
--- a/cpukit/libdl/rtl-mdreloc-i386.c
+++ b/cpukit/libdl/rtl-mdreloc-i386.c
@@ -15,6 +15,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -101,3 +110,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
return true;
}
+
+bool
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* 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)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 057d6ce6dd..e7e2a4c9c5 100644
--- a/cpukit/libdl/rtl-mdreloc-lm32.c
+++ b/cpukit/libdl/rtl-mdreloc-lm32.c
@@ -9,6 +9,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -118,3 +127,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 36692ebf85..8a91ebcc44 100644
--- a/cpukit/libdl/rtl-mdreloc-m68k.c
+++ b/cpukit/libdl/rtl-mdreloc-m68k.c
@@ -15,6 +15,8 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
static inline int overflow_8_check(int value)
{
@@ -30,6 +32,13 @@ static inline int overflow_16_check(int value)
return false;
}
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
+
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
{
@@ -146,3 +155,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 c17dbc2ee2..7ceac54765 100644
--- a/cpukit/libdl/rtl-mdreloc-mips.c
+++ b/cpukit/libdl/rtl-mdreloc-mips.c
@@ -9,6 +9,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -188,3 +197,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
return true;
}
+
+bool
+rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t* 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)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 1fb05e6977..27b0cf6824 100644
--- a/cpukit/libdl/rtl-mdreloc-moxie.c
+++ b/cpukit/libdl/rtl-mdreloc-moxie.c
@@ -10,6 +10,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -86,3 +95,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 6909167704..978a2e8999 100644
--- a/cpukit/libdl/rtl-mdreloc-powerpc.c
+++ b/cpukit/libdl/rtl-mdreloc-powerpc.c
@@ -15,11 +15,19 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
#define ha(x) ((((u_int32_t)(x) & 0x8000) ? \
((u_int32_t)(x) + 0x10000) : (u_int32_t)(x)) >> 16)
#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)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -158,6 +166,22 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
(void *)*where, where, rtems_rtl_obj_oname (obj));
break;
+ case R_TYPE(SDAREL16):
+ /*
+ * A sign-extended 16 bit value relative to _SDA_BASE_, for use with
+ * small data items.
+ */
+ mask = 0xffff;
+ tmp = *((Elf32_Half*) where);
+ tmp &= ~mask;
+ tmp |= (symvalue + rela->r_addend - (Elf_Addr)where) & mask;
+ *((Elf32_Half*) where) = tmp;
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
+ printf ("rtl: SDAREL16 %p @ %p in %s\n",
+ (void *) (uintptr_t) *((Elf32_Half*) where),
+ where, rtems_rtl_obj_oname (obj));
+ break;
+
default:
printf ("rtl: reloc unknown: sym = %lu, type = %lu, offset = %p, "
"contents = %p\n",
@@ -183,3 +207,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 a8bf5e15ae..8d1239421d 100644
--- a/cpukit/libdl/rtl-mdreloc-sparc.c
+++ b/cpukit/libdl/rtl-mdreloc-sparc.c
@@ -41,6 +41,8 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
/*
* The following table holds for each relocation type:
@@ -128,6 +130,13 @@ 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)
+{
+ return 0;
+}
+
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
{
@@ -144,6 +153,7 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
{
Elf_Addr *where;
Elf_Word type, value, mask;
+ Elf_Addr tmp = 0;
where = (Elf_Addr *) (sect->base + rela->r_offset);
@@ -219,31 +229,32 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
value &= mask;
if (RELOC_UNALIGNED(type)) {
- /* Handle unaligned relocations. */
- Elf_Addr tmp = 0;
- char *ptr = (char *)where;
+ /*
+ * Handle unaligned relocations.
+ */
+ char *ptr = (char*) where;
int i, size = RELOC_TARGET_SIZE (type) / 8;
/* Read it in one byte at a time. */
- for (i=0; i<size; i++)
+ for (i = size - 1; i >= 0; i--)
tmp = (tmp << 8) | ptr[i];
tmp &= ~mask;
tmp |= value;
/* Write it back out. */
- for (i=0; i<size; i++)
- ptr[i] = ((tmp >> (8*i)) & 0xff);
-
+ for (i = size - 1; i >= 0; i--, tmp >>= 8)
+ ptr[i] = tmp & 0xff;
} else {
*where &= ~mask;
*where |= value;
+ tmp = *where;
}
if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
printf ("rtl: %s %p @ %p in %s\n",
- reloc_names[type], (void *)*where, where, rtems_rtl_obj_oname (obj));
-
+ reloc_names[ELF_R_TYPE(rela->r_info)],
+ (void *)tmp, where, rtems_rtl_obj_oname (obj));
return true;
}
@@ -259,3 +270,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* 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 5372e81e8d..7f958a5fb8 100644
--- a/cpukit/libdl/rtl-mdreloc-v850.c
+++ b/cpukit/libdl/rtl-mdreloc-v850.c
@@ -10,6 +10,15 @@
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+uint32_t
+rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
+ const Elf_Shdr* shdr)
+{
+ return 0;
+}
bool
rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
@@ -95,3 +104,23 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
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)
+{
+ return rtems_rtl_elf_unwind_dw2_parse (obj, name, flags);
+}
+
+bool
+rtems_rtl_elf_unwind_register (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_register (obj);
+}
+
+bool
+rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t* obj)
+{
+ return rtems_rtl_elf_unwind_dw2_deregister (obj);
+}
diff --git a/cpukit/libdl/rtl-obj.c b/cpukit/libdl/rtl-obj.c
index bdcebce61e..bb0bc8d543 100644
--- a/cpukit/libdl/rtl-obj.c
+++ b/cpukit/libdl/rtl-obj.c
@@ -49,14 +49,21 @@
/**
* The table of supported loader formats.
*/
-static rtems_rtl_loader_table_t loaders[RTEMS_RTL_ELF_LOADER_COUNT +
- RTEMS_RTL_RAP_LOADER_COUNT] =
+#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] =
{
#if RTEMS_RTL_RAP_LOADER
- { rtems_rtl_rap_file_check, rtems_rtl_rap_file_load, rtems_rtl_rap_file_sig },
+ { .check = rtems_rtl_rap_file_check,
+ .load = rtems_rtl_rap_file_load,
+ .unload = rtems_rtl_rap_file_unload,
+ .unload = rtems_rtl_rap_file_unload,
+ .signature = rtems_rtl_rap_file_sig },
#endif
#if RTEMS_RTL_ELF_LOADER
- { rtems_rtl_elf_file_check, rtems_rtl_elf_file_load, rtems_rtl_elf_file_sig },
+ { .check = rtems_rtl_elf_file_check,
+ .load = rtems_rtl_elf_file_load,
+ .unload = rtems_rtl_elf_file_unload,
+ .signature = rtems_rtl_elf_file_sig },
#endif
};
@@ -72,6 +79,10 @@ rtems_rtl_obj_alloc (void)
* Initialise the chains.
*/
rtems_chain_initialize_empty (&obj->sections);
+ /*
+ * No valid format.
+ */
+ obj->format = -1;
}
return obj;
}
@@ -97,14 +108,14 @@ rtems_rtl_obj_free (rtems_rtl_obj_t* obj)
}
if (!rtems_chain_is_node_off_chain (&obj->link))
rtems_chain_extract (&obj->link);
- rtems_rtl_alloc_module_del (&obj->text_base, &obj->const_base,
+ rtems_rtl_alloc_module_del (&obj->text_base, &obj->const_base, &obj->eh_base,
&obj->data_base, &obj->bss_base);
rtems_rtl_symbol_obj_erase (obj);
rtems_rtl_obj_free_names (obj);
if (obj->sec_num)
free (obj->sec_num);
- if (obj->detail)
- rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, (void*)obj->detail);
+ if (obj->linkmap)
+ rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, (void*) obj->linkmap);
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, obj);
return true;
}
@@ -238,7 +249,7 @@ rtems_rtl_scan_decimal (const uint8_t* string, size_t len)
static size_t
rtems_rtl_sect_align (size_t offset, uint32_t alignment)
{
- if ((alignment > 1) && ((offset & ~alignment) != 0))
+ if ((alignment > 1) && ((offset & (alignment - 1)) != 0))
offset = (offset + alignment) & ~(alignment - 1);
return offset;
}
@@ -264,12 +275,12 @@ rtems_rtl_obj_sect_summer (rtems_chain_node* node, void* data)
}
static size_t
-rtems_rtl_obj_section_size (rtems_rtl_obj_t* obj, uint32_t mask)
+rtems_rtl_obj_section_size (const rtems_rtl_obj_t* obj, uint32_t mask)
{
rtems_rtl_obj_sect_summer_t summer;
summer.mask = mask;
summer.size = 0;
- rtems_rtl_chain_iterate (&obj->sections,
+ rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
rtems_rtl_obj_sect_summer,
&summer);
return summer.size;
@@ -302,12 +313,12 @@ rtems_rtl_obj_sect_aligner (rtems_chain_node* node, void* data)
}
static size_t
-rtems_rtl_obj_section_alignment (rtems_rtl_obj_t* obj, uint32_t mask)
+rtems_rtl_obj_section_alignment (const rtems_rtl_obj_t* obj, uint32_t mask)
{
rtems_rtl_obj_sect_aligner_t aligner;
aligner.mask = mask;
aligner.alignment = 0;
- rtems_rtl_chain_iterate (&obj->sections,
+ rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
rtems_rtl_obj_sect_aligner,
&aligner);
return aligner.alignment;
@@ -401,26 +412,30 @@ rtems_rtl_obj_add_section (rtems_rtl_obj_t* obj,
int info,
uint32_t flags)
{
- rtems_rtl_obj_sect_t* sect = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
- sizeof (rtems_rtl_obj_sect_t), true);
- if (!sect)
+ if (size > 0)
{
- rtems_rtl_set_error (ENOMEM, "adding allocated section");
- return false;
+ rtems_rtl_obj_sect_t* sect = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
+ sizeof (rtems_rtl_obj_sect_t),
+ true);
+ if (!sect)
+ {
+ rtems_rtl_set_error (ENOMEM, "adding allocated section");
+ return false;
+ }
+ sect->section = section;
+ sect->name = rtems_rtl_strdup (name);
+ sect->size = size;
+ sect->offset = offset;
+ sect->alignment = alignment;
+ sect->link = link;
+ sect->info = info;
+ sect->flags = flags;
+ sect->base = NULL;
+ rtems_chain_append (&obj->sections, &sect->node);
+
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_SECTION))
+ printf ("rtl: sect: %-2d: %s (%zu)\n", section, name, size);
}
- sect->section = section;
- sect->name = rtems_rtl_strdup (name);
- sect->size = size;
- sect->offset = offset;
- sect->alignment = alignment;
- sect->link = link;
- sect->info = info;
- sect->flags = flags;
- sect->base = NULL;
- rtems_chain_append (&obj->sections, &sect->node);
-
- if (rtems_rtl_trace (RTEMS_RTL_TRACE_SECTION))
- printf ("rtl: sect: %-2d: %s\n", section, name);
return true;
}
@@ -464,12 +479,13 @@ rtems_rtl_obj_sect_match_name (rtems_chain_node* node, void* data)
}
rtems_rtl_obj_sect_t*
-rtems_rtl_obj_find_section (rtems_rtl_obj_t* obj, const char* name)
+rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
+ const char* name)
{
rtems_rtl_obj_sect_finder_t match;
match.sect = NULL;
match.name = name;
- rtems_rtl_chain_iterate (&obj->sections,
+ rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
rtems_rtl_obj_sect_match_name,
&match);
return match.sect;
@@ -489,61 +505,74 @@ rtems_rtl_obj_sect_match_index (rtems_chain_node* node, void* data)
}
rtems_rtl_obj_sect_t*
-rtems_rtl_obj_find_section_by_index (rtems_rtl_obj_t* obj, int index)
+rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t* obj,
+ int index)
{
rtems_rtl_obj_sect_finder_t match;
match.sect = NULL;
match.index = index;
- rtems_rtl_chain_iterate (&obj->sections,
+ rtems_rtl_chain_iterate ((rtems_chain_control*) &obj->sections,
rtems_rtl_obj_sect_match_index,
&match);
return match.sect;
}
size_t
-rtems_rtl_obj_text_size (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_text_size (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_TEXT);
}
uint32_t
-rtems_rtl_obj_text_alignment (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_TEXT);
}
size_t
-rtems_rtl_obj_const_size (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_const_size (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_CONST);
}
uint32_t
-rtems_rtl_obj_const_alignment (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_eh_alignment (const rtems_rtl_obj_t* 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)
+{
+ 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)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_CONST);
}
size_t
-rtems_rtl_obj_data_size (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_data_size (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_DATA);
}
uint32_t
-rtems_rtl_obj_data_alignment (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_DATA);
}
size_t
-rtems_rtl_obj_bss_size (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_bss_size (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_size (obj, RTEMS_RTL_OBJ_SECT_BSS);
}
uint32_t
-rtems_rtl_obj_bss_alignment (rtems_rtl_obj_t* obj)
+rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t* obj)
{
return rtems_rtl_obj_section_alignment (obj, RTEMS_RTL_OBJ_SECT_BSS);
}
@@ -572,21 +601,25 @@ typedef struct
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_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;
+ uintptr_t old_end;
+ uintptr_t new_start;
- if ( !(sect->flags & sync_ctx->mask) || !sect->size)
+ if ((sect->flags & sync_ctx->mask) == 0 || sect->size == 0)
return true;
- if (sync_ctx->end_va == sync_ctx->start_va) {
+ if (sync_ctx->end_va == sync_ctx->start_va)
+ {
sync_ctx->start_va = sect->base;
- } else {
- old_end = (uintptr_t)sync_ctx->end_va & ~(sync_ctx->cache_line_size - 1);
- new_start = (uintptr_t)sect->base & ~(sync_ctx->cache_line_size - 1);
- if ( (sect->base < sync_ctx->start_va) ||
- (new_start - old_end > sync_ctx->cache_line_size) ) {
+ }
+ else
+ {
+ old_end = (uintptr_t) sync_ctx->end_va & ~(sync_ctx->cache_line_size - 1);
+ new_start = (uintptr_t) sect->base & ~(sync_ctx->cache_line_size - 1);
+ if ((sect->base < sync_ctx->start_va) ||
+ (new_start - old_end > sync_ctx->cache_line_size))
+ {
rtems_cache_instruction_sync_after_code_change(sync_ctx->start_va,
sync_ctx->end_va - sync_ctx->start_va + 1);
sync_ctx->start_va = sect->base;
@@ -599,7 +632,7 @@ 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_t* obj)
{
rtems_rtl_obj_sect_sync_ctx_t sync_ctx;
@@ -610,7 +643,7 @@ rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t* obj)
sync_ctx.mask = RTEMS_RTL_OBJ_SECT_TEXT | RTEMS_RTL_OBJ_SECT_CONST |
RTEMS_RTL_OBJ_SECT_DATA | RTEMS_RTL_OBJ_SECT_BSS |
- RTEMS_RTL_OBJ_SECT_EXEC;
+ RTEMS_RTL_OBJ_SECT_EH | RTEMS_RTL_OBJ_SECT_EXEC;
sync_ctx.start_va = 0;
sync_ctx.end_va = sync_ctx.start_va;
@@ -634,6 +667,87 @@ rtems_rtl_obj_load_symbols (rtems_rtl_obj_t* obj,
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_chain_control* sections = &obj->sections;
+ rtems_chain_node* node = rtems_chain_first (sections);
+ /*
+ * Find the section being linked-to. If the linked-to link field is 0 we have
+ * the end and the section's order is the position we are after.
+ */
+ while (!rtems_chain_is_tail (sections, node))
+ {
+ rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
+ if (sect->section == section)
+ {
+ const uint32_t mask = sect->flags & RTEMS_RTL_OBJ_SECT_TYPES;
+ int order = 0;
+ if (sect->link != 0)
+ {
+ /*
+ * Have we already visited this type of section? Avoid nesting for
+ * ever.
+ */
+ if ((sect->flags & visited_mask) != 0)
+ {
+ rtems_rtl_set_error (errno, "section link loop");
+ return -1;
+ }
+ return rtems_rtl_obj_sections_linked_to_order (obj,
+ sect->link,
+ visited_mask | mask);
+ }
+ node = rtems_chain_first (sections);
+ while (!rtems_chain_is_tail (sections, node))
+ {
+ sect = (rtems_rtl_obj_sect_t*) node;
+ if ((sect->flags & mask) == mask)
+ {
+ if (sect->section == section)
+ return order;
+ ++order;
+ }
+ node = rtems_chain_next (node);
+ }
+ }
+ node = rtems_chain_next (node);
+ }
+ rtems_rtl_set_error (errno, "section link not found");
+ return -1;
+}
+
+static void
+rtems_rtl_obj_sections_link_order (uint32_t mask, rtems_rtl_obj_t* 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;
+ if ((sect->flags & mask) == mask)
+ {
+ /*
+ * If the section is linked in order find the linked-to section's order
+ * and move the section in the section list to
+ */
+ if (sect->link == 0)
+ sect->load_order = order++;
+ else
+ {
+ sect->load_order =
+ rtems_rtl_obj_sections_linked_to_order (obj,
+ sect->link,
+ mask);
+ }
+ }
+ node = rtems_chain_next (node);
+ }
+}
+
static size_t
rtems_rtl_obj_sections_loader (uint32_t mask,
rtems_rtl_obj_t* obj,
@@ -646,42 +760,54 @@ rtems_rtl_obj_sections_loader (uint32_t mask,
rtems_chain_node* node = rtems_chain_first (sections);
size_t base_offset = 0;
bool first = true;
+ int order = 0;
+
while (!rtems_chain_is_tail (sections, node))
{
rtems_rtl_obj_sect_t* sect = (rtems_rtl_obj_sect_t*) node;
if ((sect->size != 0) && ((sect->flags & mask) != 0))
{
- if (!first)
- base_offset = rtems_rtl_sect_align (base_offset, sect->alignment);
+ if (sect->load_order == order)
+ {
+ if (!first)
+ base_offset = rtems_rtl_sect_align (base_offset, sect->alignment);
- sect->base = base + base_offset;
+ first = false;
- if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD_SECT))
- printf ("rtl: loading: %s -> %8p (%zi)\n",
- sect->name, sect->base, sect->size);
+ sect->base = base + base_offset;
- if ((sect->flags & RTEMS_RTL_OBJ_SECT_LOAD) == RTEMS_RTL_OBJ_SECT_LOAD)
- {
- if (!handler (obj, fd, sect, data))
+ if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD_SECT))
+ printf ("rtl: loading:%2d: %s -> %8p (s:%zi f:%04lx a:%lu l:%02d)\n",
+ order, sect->name, sect->base, sect->size,
+ sect->flags, sect->alignment, sect->link);
+
+ if ((sect->flags & RTEMS_RTL_OBJ_SECT_LOAD) == RTEMS_RTL_OBJ_SECT_LOAD)
+ {
+ if (!handler (obj, fd, sect, data))
+ {
+ sect->base = 0;
+ return false;
+ }
+ }
+ else if ((sect->flags & RTEMS_RTL_OBJ_SECT_ZERO) == RTEMS_RTL_OBJ_SECT_ZERO)
+ {
+ memset (base + base_offset, 0, sect->size);
+ }
+ else
{
sect->base = 0;
+ rtems_rtl_set_error (errno, "section has no load/clear op");
return false;
}
- }
- else if ((sect->flags & RTEMS_RTL_OBJ_SECT_ZERO) == RTEMS_RTL_OBJ_SECT_ZERO)
- {
- memset (base + base_offset, 0, sect->size);
- }
- else
- {
- sect->base = 0;
- rtems_rtl_set_error (errno, "section has no load op");
- return false;
- }
- base_offset += sect->size;
- first = false;
+ base_offset += sect->size;
+
+ ++order;
+
+ node = rtems_chain_first (sections);
+ continue;
+ }
}
node = rtems_chain_next (node);
@@ -698,20 +824,30 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
{
size_t text_size;
size_t const_size;
+ size_t eh_size;
size_t data_size;
size_t bss_size;
text_size = rtems_rtl_obj_text_size (obj) + rtems_rtl_obj_const_alignment (obj);
- const_size = rtems_rtl_obj_const_size (obj) + rtems_rtl_obj_data_alignment (obj);
+ const_size = rtems_rtl_obj_const_size (obj) + rtems_rtl_obj_eh_alignment (obj);
+ eh_size = rtems_rtl_obj_eh_size (obj) + rtems_rtl_obj_data_alignment (obj);
data_size = rtems_rtl_obj_data_size (obj) + rtems_rtl_obj_bss_alignment (obj);
bss_size = rtems_rtl_obj_bss_size (obj);
/*
+ * Set the sizes held in the object data. We need this for a fast reference.
+ */
+ obj->text_size = text_size;
+ obj->eh_size = eh_size;
+ obj->bss_size = bss_size;
+
+ /*
* Let the allocator manage the actual allocation. The user can use the
* standard heap or provide a specific allocator with memory protection.
*/
if (!rtems_rtl_alloc_module_new (&obj->text_base, text_size,
&obj->const_base, const_size,
+ &obj->eh_base, eh_size,
&obj->data_base, data_size,
&obj->bss_base, bss_size))
{
@@ -720,7 +856,7 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
return false;
}
- obj->exec_size = text_size + const_size + data_size + bss_size;
+ obj->exec_size = text_size + const_size + eh_size + data_size + bss_size;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_LOAD_SECT))
{
@@ -728,6 +864,8 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
obj->text_base, text_size, rtems_rtl_obj_text_alignment (obj));
printf ("rtl: load sect: const - b:%p s:%zi a:%" PRIu32 "\n",
obj->const_base, const_size, rtems_rtl_obj_const_alignment (obj));
+ printf ("rtl: load sect: eh - b:%p s:%zi a:%" PRIu32 "\n",
+ obj->eh_base, eh_size, rtems_rtl_obj_eh_alignment (obj));
printf ("rtl: load sect: data - b:%p s:%zi a:%" PRIu32 "\n",
obj->data_base, data_size, rtems_rtl_obj_data_alignment (obj));
printf ("rtl: load sect: bss - b:%p s:%zi a:%" PRIu32 "\n",
@@ -735,6 +873,14 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
}
/*
+ * Determine the load order.
+ */
+ rtems_rtl_obj_sections_link_order (RTEMS_RTL_OBJ_SECT_TEXT, obj);
+ rtems_rtl_obj_sections_link_order (RTEMS_RTL_OBJ_SECT_CONST, obj);
+ rtems_rtl_obj_sections_link_order (RTEMS_RTL_OBJ_SECT_EH, obj);
+ rtems_rtl_obj_sections_link_order (RTEMS_RTL_OBJ_SECT_DATA, obj);
+
+ /*
* Load all text then data then bss sections in seperate operations so each
* type of section is grouped together.
*/
@@ -742,12 +888,14 @@ rtems_rtl_obj_load_sections (rtems_rtl_obj_t* obj,
obj, fd, obj->text_base, handler, data) ||
!rtems_rtl_obj_sections_loader (RTEMS_RTL_OBJ_SECT_CONST,
obj, fd, obj->const_base, handler, data) ||
+ !rtems_rtl_obj_sections_loader (RTEMS_RTL_OBJ_SECT_EH,
+ obj, fd, obj->eh_base, handler, data) ||
!rtems_rtl_obj_sections_loader (RTEMS_RTL_OBJ_SECT_DATA,
obj, fd, obj->data_base, handler, data) ||
!rtems_rtl_obj_sections_loader (RTEMS_RTL_OBJ_SECT_BSS,
obj, fd, obj->bss_base, handler, data))
{
- rtems_rtl_alloc_module_del (&obj->text_base, &obj->const_base,
+ rtems_rtl_alloc_module_del (&obj->text_base, &obj->const_base, &obj->eh_base,
&obj->data_base, &obj->bss_base);
obj->exec_size = 0;
return false;
@@ -972,7 +1120,7 @@ rtems_rtl_obj_archive_find (rtems_rtl_obj_t* obj, int fd)
* name from the table and compare with the name we are after.
*/
#define RTEMS_RTL_MAX_FILE_SIZE (256)
- char name[RTEMS_RTL_MAX_FILE_SIZE];
+ char name[RTEMS_RTL_MAX_FILE_SIZE];
if (!rtems_rtl_seek_read (fd, extended_file_names + extended_off,
RTEMS_RTL_MAX_FILE_SIZE, (uint8_t*) &name[0]))
@@ -1016,7 +1164,7 @@ rtems_rtl_obj_archive_find (rtems_rtl_obj_t* obj, int fd)
return false;
}
-bool
+static bool
rtems_rtl_obj_file_load (rtems_rtl_obj_t* obj, int fd)
{
int l;
@@ -1024,13 +1172,24 @@ rtems_rtl_obj_file_load (rtems_rtl_obj_t* obj, int fd)
for (l = 0; l < (sizeof (loaders) / sizeof (rtems_rtl_loader_table_t)); ++l)
{
if (loaders[l].check (obj, fd))
+ {
+ obj->format = l;
return loaders[l].load (obj, fd);
+ }
}
rtems_rtl_set_error (ENOENT, "no format loader found");
return false;
}
+static bool
+rtems_rtl_obj_file_unload (rtems_rtl_obj_t* obj)
+{
+ if (obj->format >= 0 && obj->format < RTEMS_RTL_LOADERS)
+ return loaders[obj->format].unload (obj);
+ return false;
+}
+
bool
rtems_rtl_obj_load (rtems_rtl_obj_t* obj)
{
@@ -1057,20 +1216,16 @@ rtems_rtl_obj_load (rtems_rtl_obj_t* obj)
{
if (!rtems_rtl_obj_archive_find (obj, fd))
{
- rtems_rtl_obj_caches_flush ();
close (fd);
return false;
}
}
/*
- * Call the format specific loader. Currently this is a call to the ELF
- * loader. This call could be changed to allow probes then calls if more than
- * one format is supported.
+ * Call the format specific loader.
*/
if (!rtems_rtl_obj_file_load (obj, fd))
{
- rtems_rtl_obj_caches_flush ();
close (fd);
return false;
}
@@ -1081,8 +1236,6 @@ rtems_rtl_obj_load (rtems_rtl_obj_t* obj)
return false;
}
- rtems_rtl_obj_caches_flush ();
-
close (fd);
return true;
@@ -1092,6 +1245,6 @@ bool
rtems_rtl_obj_unload (rtems_rtl_obj_t* obj)
{
_rtld_linkmap_delete(obj);
- rtems_rtl_symbol_obj_erase (obj);
- return rtems_rtl_obj_free (obj);
+ rtems_rtl_obj_file_unload (obj);
+ return true;
}
diff --git a/cpukit/libdl/rtl-obj.h b/cpukit/libdl/rtl-obj.h
index 80fc60fb05..6a35a72822 100644
--- a/cpukit/libdl/rtl-obj.h
+++ b/cpukit/libdl/rtl-obj.h
@@ -56,14 +56,20 @@ typedef struct rtems_rtl_loader_format_s
typedef bool (*rtems_rtl_loader_check) (rtems_rtl_obj_t* obj, int fd);
/**
- * The type of the format loader handler. This handler loads the specific
+ * 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);
/**
- * The type of the format loader handler. This handler loads the specific
- * format.
+ * 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);
+
+/**
+ * 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);
@@ -72,9 +78,10 @@ typedef rtems_rtl_loader_format_t* (*rtems_rtl_loader_sig) (void);
*/
typedef struct rtems_rtl_loader_table_s
{
- rtems_rtl_loader_check check; /**< The check handler. */
- rtems_rtl_loader_load load; /**< The loader. */
- rtems_rtl_loader_sig signature; /**< The loader's signature. */
+ 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;
/**
@@ -84,18 +91,30 @@ typedef struct rtems_rtl_loader_table_s
#define RTEMS_RTL_OBJ_SECT_CONST (1 << 1) /**< Section holds program text. */
#define RTEMS_RTL_OBJ_SECT_DATA (1 << 2) /**< Section holds program data. */
#define RTEMS_RTL_OBJ_SECT_BSS (1 << 3) /**< Section holds program bss. */
-#define RTEMS_RTL_OBJ_SECT_REL (1 << 4) /**< Section holds relocation records. */
-#define RTEMS_RTL_OBJ_SECT_RELA (1 << 5) /**< Section holds relocation addend
+#define RTEMS_RTL_OBJ_SECT_EH (1 << 4) /**< Section holds exception data. */
+#define RTEMS_RTL_OBJ_SECT_REL (1 << 5) /**< Section holds relocation records. */
+#define RTEMS_RTL_OBJ_SECT_RELA (1 << 6) /**< Section holds relocation addend
* records. */
-#define RTEMS_RTL_OBJ_SECT_SYM (1 << 6) /**< Section holds symbols. */
-#define RTEMS_RTL_OBJ_SECT_STR (1 << 7) /**< Section holds strings. */
-#define RTEMS_RTL_OBJ_SECT_ALLOC (1 << 8) /**< Section allocates runtime memory. */
-#define RTEMS_RTL_OBJ_SECT_LOAD (1 << 9) /**< Section is loaded from object file. */
-#define RTEMS_RTL_OBJ_SECT_WRITE (1 << 10) /**< Section is writable, ie data. */
-#define RTEMS_RTL_OBJ_SECT_EXEC (1 << 11) /**< Section is executable. */
-#define RTEMS_RTL_OBJ_SECT_ZERO (1 << 12) /**< Section is preset to zero. */
-#define RTEMS_RTL_OBJ_SECT_CTOR (1 << 13) /**< Section contains constructors. */
-#define RTEMS_RTL_OBJ_SECT_DTOR (1 << 14) /**< Section contains destructors. */
+#define RTEMS_RTL_OBJ_SECT_SYM (1 << 7) /**< Section holds symbols. */
+#define RTEMS_RTL_OBJ_SECT_STR (1 << 8) /**< Section holds strings. */
+#define RTEMS_RTL_OBJ_SECT_ALLOC (1 << 9) /**< Section allocates runtime memory. */
+#define RTEMS_RTL_OBJ_SECT_LOAD (1 << 10) /**< Section is loaded from object file. */
+#define RTEMS_RTL_OBJ_SECT_WRITE (1 << 11) /**< Section is writable, ie data. */
+#define RTEMS_RTL_OBJ_SECT_EXEC (1 << 12) /**< Section is executable. */
+#define RTEMS_RTL_OBJ_SECT_ZERO (1 << 13) /**< Section is preset to zero. */
+#define RTEMS_RTL_OBJ_SECT_LINK (1 << 14) /**< Section is link-ordered. */
+#define RTEMS_RTL_OBJ_SECT_CTOR (1 << 15) /**< Section contains constructors. */
+#define RTEMS_RTL_OBJ_SECT_DTOR (1 << 16) /**< Section contains destructors. */
+#define RTEMS_RTL_OBJ_SECT_LOCD (1 << 17) /**< Section has been located. */
+
+/**
+ * Section types mask.
+ */
+#define RTEMS_RTL_OBJ_SECT_TYPES (RTEMS_RTL_OBJ_SECT_TEXT | \
+ RTEMS_RTL_OBJ_SECT_CONST | \
+ RTEMS_RTL_OBJ_SECT_DATA | \
+ RTEMS_RTL_OBJ_SECT_BSS | \
+ RTEMS_RTL_OBJ_SECT_EH)
/**
* An object file is made up of sections and the can be more than
@@ -109,13 +128,14 @@ struct rtems_rtl_obj_sect_s
const char* name; /**< The section's name. */
size_t size; /**< The size of the section in memory. */
off_t offset; /**< Offset into the object file. Relative to
- * the start of the object file. */
+ * the start of the object file. */
uint32_t alignment; /**< Alignment of this section. */
int link; /**< Section link field. */
int info; /**< Secfion info field. */
uint32_t flags; /**< The section's flags. */
void* base; /**< The base address of the section in
* memory. */
+ int load_order; /**< Order we load sections. */
};
/**
@@ -135,6 +155,7 @@ struct rtems_rtl_obj_s
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. */
@@ -153,26 +174,27 @@ struct rtems_rtl_obj_s
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. */
+ * in memory. */
+ size_t text_size; /**< The size of the text section. */
void* const_base; /**< The base address of the const section
- * in memory. */
+ * 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. */
+ * in memory. */
void* bss_base; /**< The base address of the bss section
- * in memory. */
+ * in memory. */
size_t bss_size; /**< The size of the bss section. */
size_t exec_size; /**< The amount of executable memory
- * allocated */
+ * allocated */
void* entry; /**< The entry point of the module. */
uint32_t checksum; /**< The checksum of the text sections. A
- * zero means do not checksum. */
- void* detail; /**< The file details. It contains the elf file
- * detail, mainly including elf file name,
- * section offset, section size, which
- * elf this section belongs to.*/
+ * 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. */
};
/**
@@ -258,6 +280,20 @@ static inline bool rtems_rtl_obj_aname_valid (const rtems_rtl_obj_t* obj)
}
/**
+ * Is the address inside the text section?
+ *
+ * @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)
+{
+ return
+ (address >= obj->text_base) &&
+ (address < (obj->text_base + obj->text_size));
+}
+
+/**
* Allocate an object structure on the heap.
*
* @retval NULL No memory for the object.
@@ -300,18 +336,6 @@ bool rtems_rtl_parse_name (const char* name,
off_t* ooffset);
/**
- * Load the object file.
- *
- * @param obj The object file's descriptor.
- * @param fd The file descriptor.
- * @param load_syms Load symbols.
- * @param load_dep Load dependent object files.
- * @retval true The load was successful.
- * @retval false The load failed. The RTL error has been set.
- */
-bool rtems_rtl_obj_file_load (rtems_rtl_obj_t* obj, int fd);
-
-/**
* Check of the name matches the object file's object name.
*
* @param obj The object file's descriptor.
@@ -371,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 (rtems_rtl_obj_t* obj,
- const char* name);
+rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section (const rtems_rtl_obj_t* obj,
+ const char* name);
/**
* Find a section given a section's index number.
@@ -382,21 +406,21 @@ rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section (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 (rtems_rtl_obj_t* obj,
- int index);
+rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t* obj,
+ int index);
/**
- * The text size of the object file. Only use once all the sections has been
- * added. It includes alignments between sections that are part of the object's
- * text area. The consts sections are included in this section.
+ * The text section size. Only use once all the sections has been added. It
+ * includes alignments between sections that are part of the object's text
+ * area. The consts sections are included in this section.
*
* @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 (rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_text_size (const rtems_rtl_obj_t* obj);
/**
- * The text section alignment of the object file. Only use once all the
+ * The text section alignment for the object file. Only use once all the
* sections has been added. The section alignment is the alignment of the first
* text type section loaded the text section.
*
@@ -406,20 +430,20 @@ size_t rtems_rtl_obj_text_size (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 (rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t* obj);
/**
- * The const size of the object file. Only use once all the sections has been
- * added. It includes alignments between sections that are part of the object's
- * const area. The consts sections are included in this section.
+ * The const section size. Only use once all the sections has been added. It
+ * includes alignments between sections that are part of the object's const
+ * area. The consts sections are included in this section.
*
* @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 (rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_const_size (const rtems_rtl_obj_t* obj);
/**
- * The const section alignment of the object file. Only use once all the
+ * The const section alignment for the object file. Only use once all the
* sections has been added. The section alignment is the alignment of the first
* const type section loaded the const section.
*
@@ -429,20 +453,42 @@ size_t rtems_rtl_obj_const_size (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 (rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_const_alignment (const rtems_rtl_obj_t* obj);
+
+/**
+ * The eh section size. Only use once all the sections has been added. It
+ * includes alignments between sections that are part of the object's bss area.
+ *
+ * @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);
+
+/**
+ * The eh section alignment for the object file. Only use once all the sections
+ * has been added. The section alignment is the alignment of the first bss type
+ * section loaded the bss section.
+ *
+ * You can assume the alignment is a positive integral power of 2 if not 0 or
+ * 1. If 0 or 1 then there is no alignment.
+ *
+ * @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);
/**
- * The data size of the object file. Only use once all the sections has been
- * added. It includes alignments between sections that are part of the object's
- * data area.
+ * The data section size. Only use once all the sections has been added. It
+ * includes alignments between sections that are part of the object's data
+ * area.
*
* @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 (rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_data_size (const rtems_rtl_obj_t* obj);
/**
- * The data section alignment of the object file. Only use once all the
+ * The data section alignment for the object file. Only use once all the
* sections has been added. The section alignment is the alignment of the first
* data type section loaded the data section.
*
@@ -452,20 +498,19 @@ size_t rtems_rtl_obj_data_size (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 (rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t* obj);
/**
- * The bss size of the object file. Only use once all the sections has been
- * added. It includes alignments between sections that are part of the object's
- * bss area.
+ * The bss section size. Only use once all the sections has been added. It
+ * includes alignments between sections that are part of the object's bss area.
*
* @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 (rtems_rtl_obj_t* obj);
+size_t rtems_rtl_obj_bss_size (const rtems_rtl_obj_t* obj);
/**
- * The bss section alignment of the object file. Only use once all the
+ * The bss section alignment for the object file. Only use once all the
* sections has been added. The section alignment is the alignment of the first
* bss type section loaded the bss section.
*
@@ -475,7 +520,7 @@ size_t rtems_rtl_obj_bss_size (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 (rtems_rtl_obj_t* obj);
+uint32_t rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t* obj);
/**
* Relocate the object file. The object file's section are parsed for any
diff --git a/cpukit/libdl/rtl-rap.c b/cpukit/libdl/rtl-rap.c
index a7fcb9f953..cb7b751cd0 100644
--- a/cpukit/libdl/rtl-rap.c
+++ b/cpukit/libdl/rtl-rap.c
@@ -427,20 +427,22 @@ rtems_rtl_rap_relocate (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
}
/**
- * The structure of obj->detail is
+ * The structure of obj->linkmap is:
*
* |object_detail(0..obj_num)|section_detail(0..sec_num[0..obj_num])|
* obj_name(0..obj_num)|section_name(0..sec_num[0..obj_num])
*
*/
static bool
-rtems_rtl_rap_load_details (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
+rtems_rtl_rap_load_linkmap (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
{
+ void* detail;
struct link_map* tmp1;
- section_detail* tmp2;
- uint32_t obj_detail_size;
- uint32_t pos = 0;
- int i,j;
+ section_detail* tmp2;
+ uint32_t obj_detail_size;
+ uint32_t pos = 0;
+ int i;
+ int j;
obj_detail_size = sizeof (struct link_map) * obj->obj_num;
@@ -449,26 +451,31 @@ rtems_rtl_rap_load_details (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
obj_detail_size += (obj->sec_num[i] * sizeof (section_detail));
}
- obj->detail = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
- obj_detail_size + rap->strtable_size, true);
+ detail = rtems_rtl_alloc_new (RTEMS_RTL_ALLOC_OBJECT,
+ obj_detail_size + rap->strtable_size, true);
- if (!obj->detail)
+ if (!detail)
{
rap->strtable_size = 0;
rtems_rtl_set_error (ENOMEM, "no memory for obj global syms");
return false;
}
- rap->strtable = obj->detail + obj_detail_size;
+ rap->strtable = detail + obj_detail_size;
- /* Read the obj names and section names */
- if (!rtems_rtl_obj_comp_read (rap->decomp, rap->strtable,
+ /*
+ * Read the obj names and section names
+ */
+ if (!rtems_rtl_obj_comp_read (rap->decomp,
+ rap->strtable,
rap->strtable_size))
{
- rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, obj->detail);
+ rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_OBJECT, detail);
return false;
}
+ obj->linkmap = (struct link_map*) detail;
+
if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
{
if (rap->rpathlen > 0)
@@ -489,7 +496,7 @@ rtems_rtl_rap_load_details (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
for (i = 0; i < obj->obj_num; ++i)
{
- tmp1 = (struct link_map*) (obj->detail) + i;
+ tmp1 = obj->linkmap + i;
tmp1->name = rap->strtable + pos;
tmp1->sec_num = obj->sec_num[i];
tmp1->rpathlen = rap->rpathlen;
@@ -509,17 +516,17 @@ rtems_rtl_rap_load_details (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
}
}
- tmp2 =(section_detail*) ((struct link_map*) (obj->detail) + obj->obj_num);
+ tmp2 = (section_detail*) (obj->linkmap + obj->obj_num);
for (i = 0; i < obj->obj_num; ++i)
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
{
- printf ("File %d: %s\n", i, ((struct link_map*) obj->detail + i)->name);
- printf ("Section: %d sections\n",(unsigned int) obj->sec_num[i]);
+ printf ("File %d: %s\n", i, (obj->linkmap + i)->name);
+ printf ("Section: %d sections\n", (unsigned int) obj->sec_num[i]);
}
- ((struct link_map*)obj->detail + i)->sec_detail = tmp2;
+ obj->linkmap[i].sec_detail = tmp2;
for (j = 0; j < obj->sec_num[i]; ++j)
{
@@ -532,7 +539,8 @@ rtems_rtl_rap_load_details (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj)
!rtems_rtl_rap_read_uint32 (rap->decomp, &offset) ||
!rtems_rtl_rap_read_uint32 (rap->decomp, &size))
{
- rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_SYMBOL, obj->detail);
+ rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_SYMBOL, obj->linkmap);
+ obj->linkmap = NULL;
return false;
}
@@ -907,7 +915,7 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
if (rtems_rtl_trace (RTEMS_RTL_TRACE_DETAIL))
printf ("rtl: rap: details: obj_num=%lu\n", obj->obj_num);
- if (!rtems_rtl_rap_load_details (&rap, obj))
+ if (!rtems_rtl_rap_load_linkmap (&rap, obj))
return false;
}
@@ -975,6 +983,13 @@ rtems_rtl_rap_file_load (rtems_rtl_obj_t* obj, int fd)
return true;
}
+bool
+rtems_rtl_rap_file_unload (rtems_rtl_obj_t* obj)
+{
+ (void) obj;
+ return true;
+}
+
rtems_rtl_loader_format_t*
rtems_rtl_rap_file_sig (void)
{
diff --git a/cpukit/libdl/rtl-rap.h b/cpukit/libdl/rtl-rap.h
index f828b1fbdc..eca6e9ea4a 100644
--- a/cpukit/libdl/rtl-rap.h
+++ b/cpukit/libdl/rtl-rap.h
@@ -41,6 +41,13 @@ bool 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);
/**
+ * The RAP format unload handler.
+ *
+ * @param obj The object to unload.
+ */
+bool rtems_rtl_rap_file_unload (rtems_rtl_obj_t* obj);
+
+/**
* The RAP format signature handler.
*
* @return rtems_rtl_loader_format_t* The format's signature.
diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c
index 20a6aabe05..a10c931c6e 100644
--- a/cpukit/libdl/rtl-shell.c
+++ b/cpukit/libdl/rtl-shell.c
@@ -25,7 +25,7 @@
* Flag the targets where off_t is 32 bits. This is not a compiler type
* so we can't rely on prerdefines.
*/
-#if defined(__m32r__) || defined(__moxie__)
+#if defined(__moxie__)
#define PRIdoff_t PRIo32
#else
#define PRIdoff_t PRIo64
diff --git a/cpukit/libdl/rtl-unwind-dw2.c b/cpukit/libdl/rtl-unwind-dw2.c
new file mode 100644
index 0000000000..d9237c5b7e
--- /dev/null
+++ b/cpukit/libdl/rtl-unwind-dw2.c
@@ -0,0 +1,71 @@
+/*
+ * COPYRIGHT (c) 2012-2016 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+/**
+ * @file
+ *
+ * @ingroup rtems_rtld
+ *
+ * @brief RTEMS Run-Time Link Editor
+ *
+ * This is the RTL implementation.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <stdio.h>
+
+#include <rtems/rtl/rtl.h>
+#include "rtl-elf.h"
+#include "rtl-error.h"
+#include "rtl-unwind.h"
+#include "rtl-unwind-dw2.h"
+
+/*
+ * These interfaces are not exported outside the GCC source.
+ */
+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)
+{
+ return
+ ((flags & RTEMS_RTL_OBJ_SECT_CONST) != 0) &&
+ ((strcmp(name, ".eh_frame") == 0) ||
+ (strncmp(name, ".gcc_except_table.", sizeof (".gcc_except_table.") - 1) == 0));
+}
+
+bool
+rtems_rtl_elf_unwind_dw2_register (const rtems_rtl_obj_t* obj)
+{
+ rtems_rtl_obj_sect_t* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
+
+ if (sect != NULL && sect->size > 0 && sect->base != NULL)
+ {
+ __register_frame (sect->base);
+ }
+
+ return true;
+}
+
+bool rtems_rtl_elf_unwind_dw2_deregister (const rtems_rtl_obj_t* obj)
+{
+ rtems_rtl_obj_sect_t* sect = rtems_rtl_obj_find_section (obj, ".eh_frame");
+
+ if (sect != NULL && sect->size > 0 && sect->base != NULL)
+ {
+ __deregister_frame (sect->base);
+ }
+
+ return true;
+}
diff --git a/cpukit/libdl/rtl-unwind-dw2.h b/cpukit/libdl/rtl-unwind-dw2.h
new file mode 100644
index 0000000000..55b97970c2
--- /dev/null
+++ b/cpukit/libdl/rtl-unwind-dw2.h
@@ -0,0 +1,83 @@
+/*
+ * COPYRIGHT (c) 2016 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+/**
+ * @file
+ *
+ * @ingroup rtems_rtl
+ *
+ * @brief RTEMS Run-Time Linker Unwind DWARF Support.
+ */
+
+#if !defined (_RTEMS_RTL_UNWIND_DW2_H_)
+#define _RTEMS_RTL_UNWIND_DW2_H_
+
+#include "rtl-elf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#if __SIZEOF_LONG__ >= __SIZEOF_POINTER__
+ typedef long rtems_rtl_elf_unwind_dw2_sleb128;
+ typedef unsigned long rtems_rtl_elf_unwind_dw2_uleb128;
+#elif __SIZEOF_LONG_LONG__ >= __SIZEOF_POINTER__
+ typedef long long rtems_rtl_elf_unwind_dw2_sleb128;
+ typedef unsigned long long rtems_rtl_elf_unwind_dw2_uleb128;
+#else
+ #error No DW2 type available.
+#endif
+
+/**
+ * Architecture specific handler to check if a section contains exception
+ * handler data..
+ *
+ * @param obj The object file.
+ * @param name The section's name.
+ * @param uint32 flags The object file's flags.
+ * @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);
+
+/**
+ * Architecture specific handler to add an object file's unwind information to
+ * the base image.
+ *
+ * @param obj The object file.
+ * @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);
+
+/**
+ * Architecture specific handler to remove an object file's unwind information
+ * from the base image.
+ *
+ * @param obj The object file.
+ * @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);
+
+/**
+ * Read signed and unsigned LEB128 values.
+ */
+const uint8_t* rtems_rtl_elf_unwind_dw2_read_uleb128 (const uint8_t* data,
+ rtems_rtl_elf_unwind_dw2_uleb128* val);
+const uint8_t* rtems_rtl_elf_unwind_dw2_read_sleb128 (const uint8_t* data,
+ rtems_rtl_elf_unwind_dw2_sleb128* val);
+
+bool rtems_rtl_elf_unwind_dw2_relocate (const Elf_Addr* where, Elf_Word value, Elf_Word mask);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/cpukit/libdl/rtl-unwind.h b/cpukit/libdl/rtl-unwind.h
new file mode 100644
index 0000000000..f88787e1ba
--- /dev/null
+++ b/cpukit/libdl/rtl-unwind.h
@@ -0,0 +1,63 @@
+/*
+ * COPYRIGHT (c) 2016 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+/**
+ * @file
+ *
+ * @ingroup rtems_rtl
+ *
+ * @brief RTEMS Run-Time Linker Unwind Support.
+ */
+
+#if !defined (_RTEMS_RTL_UNWIND_H_)
+#define _RTEMS_RTL_UNWIND_H_
+
+#include "rtl-elf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * Architecture specific handler to check if a section contains exception
+ * handler data..
+ *
+ * @param obj The object file.
+ * @param name The section's name.
+ * @param uint32 flags The object file's flags.
+ * @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);
+
+/**
+ * Architecture specific handler to add an object file's unwind information to
+ * the base image.
+ *
+ * @param obj The object file.
+ * @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);
+
+/**
+ * Architecture specific handler to remove an object file's unwind information
+ * from the base image.
+ *
+ * @param obj The object file.
+ * @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);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/cpukit/libdl/rtl.c b/cpukit/libdl/rtl.c
index abfcf25f1c..505225116e 100644
--- a/cpukit/libdl/rtl.c
+++ b/cpukit/libdl/rtl.c
@@ -62,6 +62,7 @@
* Static RTL data is returned to the user when the linker is locked.
*/
static rtems_rtl_data_t* rtl;
+static bool rtl_data_init;
/**
* Define a default base global symbol loader function that is weak
@@ -95,11 +96,25 @@ rtems_rtl_data_init (void)
rtems_id lock;
/*
+ * We cannot set an error in this code because there is no RTL data to
+ * hold it.
+ */
+
+ if (rtl_data_init)
+ {
+ rtems_libio_unlock ();
+ return false;
+ }
+
+ rtl_data_init = true;
+
+ /*
* Always in the heap.
*/
rtl = malloc (sizeof (rtems_rtl_data_t));
if (!rtl)
{
+ rtems_libio_unlock ();
errno = ENOMEM;
return false;
}
@@ -120,6 +135,7 @@ rtems_rtl_data_init (void)
if (sc != RTEMS_SUCCESSFUL)
{
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -128,6 +144,7 @@ rtems_rtl_data_init (void)
{
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -143,6 +160,7 @@ rtems_rtl_data_init (void)
{
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -152,6 +170,7 @@ rtems_rtl_data_init (void)
rtems_rtl_symbol_table_close (&rtl->globals);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -162,6 +181,7 @@ rtems_rtl_data_init (void)
rtems_rtl_unresolved_table_close (&rtl->unresolved);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -173,6 +193,7 @@ rtems_rtl_data_init (void)
rtems_rtl_symbol_table_close (&rtl->globals);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -185,6 +206,7 @@ rtems_rtl_data_init (void)
rtems_rtl_symbol_table_close (&rtl->globals);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -198,6 +220,7 @@ rtems_rtl_data_init (void)
rtems_rtl_symbol_table_close (&rtl->globals);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -212,6 +235,7 @@ rtems_rtl_data_init (void)
rtems_rtl_symbol_table_close (&rtl->globals);
rtems_semaphore_delete (lock);
free (rtl);
+ rtems_libio_unlock ();
return false;
}
@@ -288,7 +312,7 @@ rtems_rtl_obj_caches (rtems_rtl_obj_cache_t** symbols,
}
void
-rtems_rtl_obj_caches_flush ()
+rtems_rtl_obj_caches_flush (void)
{
if (rtl)
{
@@ -438,6 +462,7 @@ rtems_rtl_load_object (const char* name, int mode)
if (!rtems_rtl_obj_find_file (obj, name))
{
rtems_rtl_obj_free (obj);
+ rtems_rtl_obj_caches_flush ();
return NULL;
}
@@ -446,9 +471,12 @@ rtems_rtl_load_object (const char* name, int mode)
if (!rtems_rtl_obj_load (obj))
{
rtems_rtl_obj_free (obj);
+ rtems_rtl_obj_caches_flush ();
return NULL;
}
+ rtems_rtl_obj_caches_flush ();
+
rtems_rtl_unresolved_resolve ();
}
@@ -514,6 +542,9 @@ rtems_rtl_unload_object (rtems_rtl_obj_t* obj)
obj->flags &= ~RTEMS_RTL_OBJ_LOCKED;
ok = rtems_rtl_obj_unload (obj);
+
+ rtems_rtl_obj_free (obj);
+ rtems_rtl_obj_caches_flush ();
}
return ok;
diff --git a/cpukit/libdl/rtl.h b/cpukit/libdl/rtl.h
index 234fc32428..fe9a7df081 100644
--- a/cpukit/libdl/rtl.h
+++ b/cpukit/libdl/rtl.h
@@ -112,7 +112,7 @@ struct rtems_rtl_data_s
};
/**
- * Get the RTL data with out locking. This call assmes the RTL is locked.
+ * 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.
* @retval NULL The RTL data is not initialised.
diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am
index 0758ec5263..a99330d5ba 100644
--- a/cpukit/preinstall.am
+++ b/cpukit/preinstall.am
@@ -212,6 +212,10 @@ $(PROJECT_INCLUDE)/rtems/rtl/rtl-sym.h: libdl/rtl-sym.h $(PROJECT_INCLUDE)/rtems
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtl/rtl-sym.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtl/rtl-sym.h
+$(PROJECT_INCLUDE)/rtems/rtl/rtl-trace.h: libdl/rtl-trace.h $(PROJECT_INCLUDE)/rtems/rtl/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtl/rtl-trace.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtl/rtl-trace.h
+
$(PROJECT_INCLUDE)/rtems/rtl/rap.h: libdl/rap.h $(PROJECT_INCLUDE)/rtems/rtl/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtl/rap.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtl/rap.h
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index ed773c4e06..8b7a39f92e 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -44,7 +44,7 @@ _SUBDIRS += syscall01
endif
if DLTESTS
-_SUBDIRS += dl01 dl02
+_SUBDIRS += dl01 dl02 dl03 dl04 dl05
endif
include $(top_srcdir)/../automake/test-subdirs.am
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index 2b32a4220c..84acb0358c 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -127,6 +127,9 @@ deviceio01/Makefile
devnullfatal01/Makefile
dl01/Makefile
dl02/Makefile
+dl03/Makefile
+dl04/Makefile
+dl05/Makefile
dumpbuf01/Makefile
ftp01/Makefile
gxx01/Makefile
diff --git a/testsuites/libtests/dl01/dl01.scn b/testsuites/libtests/dl01/dl01.scn
index ed53cfe66d..6a326b9437 100644
--- a/testsuites/libtests/dl01/dl01.scn
+++ b/testsuites/libtests/dl01/dl01.scn
@@ -1,14 +1,14 @@
+
+
*** BEGIN OF TEST libdl (RTL) 1 ***
load: /dl-o1.o
-handle: 0x2137d8 loaded
-Loaded module: argc:2
-[../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl01/dl-o1.c]
+handle: 0x2048cf0 loaded
+Loaded module: argc:2 [/opt/work/chris/rtems/kernel/rtems.git/c/src/../../testsuites/libtests/dl01/dl-o1.c]
0: Line 1
1: Line 2
-Loaded module: argc:3
-[../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl01/dl-o1.c]
+Loaded module: argc:3 [/opt/work/chris/rtems/kernel/rtems.git/c/src/../../testsuites/libtests/dl01/dl-o1.c]
0: Call 2, line 1
1: Call 2, line 2
2: Call 2, line 3
-handle: 0x2137d8 closed
+handle: 0x2048cf0 closed
*** END OF TEST libdl (RTL) 1 ***
diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index 9fbdaa5618..e9c7a1a470 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -73,6 +73,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
@@ -80,4 +82,3 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
-
diff --git a/testsuites/libtests/dl02/dl02.scn b/testsuites/libtests/dl02/dl02.scn
index f1b4489a5f..94fdfd7b66 100644
--- a/testsuites/libtests/dl02/dl02.scn
+++ b/testsuites/libtests/dl02/dl02.scn
@@ -1,22 +1,22 @@
+
+
*** BEGIN OF TEST libdl (RTL) 2 ***
load: /dl-o1.o
-handle: 0x2150d0 has unresolved externals
+handle: 0x204da80 has unresolved externals
load: /dl-o2.o
-handle: 0x215838 loaded
-Loaded module: argc:4
-[../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl02/dl-o1.c]
+handle: 0x204ea98 loaded
+Loaded module: argc:4 [/opt/work/chris/rtems/kernel/rtems.git/c/src/../../testsuites/libtests/dl02/dl-o1.c]
0: 1
1: 2
2: 3
3: 4
-Loaded module: argc:4
-[../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl02/dl-o2.c]
+Loaded module: argc:4 [/opt/work/chris/rtems/kernel/rtems.git/c/src/../../testsuites/libtests/dl02/dl-o2.c]
0: 1
1: 2
2: 3
3: 4
dl_o1_callback: string in dl_o2
rtems_main: callback count: 3
-handle: 0x2150d0 closed
-handle: 0x215838 closed
+handle: 0x204da80 closed
+handle: 0x204ea98 closed
*** END OF TEST libdl (RTL) 2 ***
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index f761b465ae..bf2d1a9717 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -73,6 +73,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/libtests/dl03/Makefile.am b/testsuites/libtests/dl03/Makefile.am
new file mode 100644
index 0000000000..de8a79a4ed
--- /dev/null
+++ b/testsuites/libtests/dl03/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = dl03
+dl03_SOURCES = init.c dl-cache.c
+
+dist_rtems_tests_DATA = dl03.scn dl03.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(dl03_OBJECTS)
+LINK_LIBS = $(dl03_LDLIBS)
+
+dl03$(EXEEXT): $(dl03_OBJECTS) $(dl03_DEPENDENCIES)
+ @rm -f dl03$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/dl03/dl-cache.c b/testsuites/libtests/dl03/dl-cache.c
new file mode 100644
index 0000000000..a2eb071e75
--- /dev/null
+++ b/testsuites/libtests/dl03/dl-cache.c
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <rtems/rtl/rtl.h>
+#include <rtems/rtl/rtl-obj-cache.h>
+#include <rtems/rtl/rtl-trace.h>
+
+#include "dl-cache.h"
+
+#define CACHE_SIZE (2048)
+#define CACHE_SIZE_TOO_BIG (-1)
+#define CACHE_BUFFER_SIZE (CACHE_SIZE * 4)
+
+static uint8_t* contents;
+
+static const char const* filename = "/dl-test";
+
+static void dl_cache_create_file(void)
+{
+ uint16_t* p;
+ int fd;
+ int i;
+ rtems_test_assert((contents = malloc(CACHE_BUFFER_SIZE)) != NULL);
+ memset(contents, 0, CACHE_BUFFER_SIZE);
+ p = (uint16_t*) contents;
+ for (i = 0; i < (CACHE_BUFFER_SIZE / sizeof(uint16_t)); ++i)
+ *p++ = i;
+ rtems_test_assert((fd = open(filename,
+ O_WRONLY | O_TRUNC | O_CREAT,
+ S_IRUSR | S_IWUSR)) >= 0);
+ rtems_test_assert(write(fd, contents, CACHE_BUFFER_SIZE) == CACHE_BUFFER_SIZE);
+ rtems_test_assert(close(fd) >= 0);
+}
+
+static bool dl_cache_check(void* buffer, off_t offset, size_t length)
+{
+ uint16_t* b;
+ uint16_t* c;
+ int i;
+ b = buffer;
+ c = (uint16_t*) (contents + offset);
+ printf("cache: buffer: ");
+ for (i = 0; i < 4; ++i)
+ printf("%04x/%04x ", b[i], c[i]);
+ printf("\n");
+ return memcmp(buffer, contents + offset, length) == 0;
+}
+
+static off_t dl_cache_buffer_offset(rtems_rtl_obj_cache_t* cache, void* buffer)
+{
+ return (off_t) (((uint8_t*) buffer) - ((uint8_t*) cache->buffer));
+}
+
+static void dl_init_rtl(void)
+{
+ /*
+ * Check the RTL object is created and can be locked and unlocked.
+ */
+ rtems_test_assert(rtems_rtl_data () == NULL);
+ rtems_test_assert(rtems_rtl_lock () != NULL);
+ rtems_test_assert(rtems_rtl_unlock () == true);
+ rtems_test_assert(rtems_rtl_data () != NULL);
+ rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL | RTEMS_RTL_TRACE_CACHE);
+}
+
+int dl_cache_test(void)
+{
+ rtems_rtl_obj_cache_t cache;
+ int fd;
+ void* buffer;
+ off_t offset_in;
+ off_t offset;
+ size_t length_in;
+ size_t length;
+
+ /*
+ * Make sure the RTL can initialise.
+ */
+ dl_init_rtl();
+
+ /*
+ * Create the file to test the cache with.
+ */
+ dl_cache_create_file();
+
+ /*
+ * Check the too big error is handled.
+ */
+ printf ("cache create with large size\n");
+ rtems_test_assert(rtems_rtl_obj_cache_open(&cache,
+ CACHE_SIZE_TOO_BIG) == false);
+
+ /*
+ * Create a cache.
+ */
+ printf ("cache create\n");
+ rtems_test_assert(rtems_rtl_obj_cache_open(&cache,
+ CACHE_SIZE) == true);
+ rtems_test_assert(cache.fd == -1);
+ rtems_test_assert(cache.file_size == 0);
+ rtems_test_assert(cache.size == CACHE_SIZE);
+ rtems_test_assert(cache.buffer != NULL);
+
+ /*
+ * Open the file to use with the cache tests.
+ */
+ printf ("cache file open\n");
+ rtems_test_assert((fd = open(filename, O_RDONLY)) >= 0);
+
+ buffer = NULL; offset_in = 0; length_in = length = CACHE_SIZE / 2;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = 0; length_in = length = CACHE_SIZE;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_SIZE / 2; length_in = length = CACHE_SIZE / 2;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - CACHE_SIZE; length_in = length = CACHE_SIZE;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == 0);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - (CACHE_SIZE / 2); length_in = length = CACHE_SIZE / 2;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == (CACHE_SIZE / 2));
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = 0; length_in = length = CACHE_SIZE / 4;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = 0; length_in = length = CACHE_SIZE / 8;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = 0; length_in = length = CACHE_SIZE;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(offset == offset_in);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - 40; length_in = length = 16;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - 40; length_in = length = 40;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - 40; length_in = length = 80;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(length == 40);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - CACHE_SIZE + 80;
+ length_in = length = 20;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ buffer = NULL; offset_in = CACHE_BUFFER_SIZE - 40;
+ length_in = length = 40;
+ printf("cache read: in: offset=%d length=%d\n", (int) offset_in, (int) length);
+ rtems_test_assert(rtems_rtl_obj_cache_read(&cache,
+ fd,
+ offset_in,
+ &buffer,
+ &length) == true);
+ offset = dl_cache_buffer_offset(&cache, buffer);
+ printf("cache read: out: offset=%d length=%d\n", (int) offset, (int) length);
+ rtems_test_assert(length == length_in);
+ rtems_test_assert(dl_cache_check(buffer, (int) offset_in, length) == true);
+
+ rtems_rtl_obj_cache_close(&cache);
+
+ return 0;
+}
diff --git a/testsuites/libtests/dl03/dl-cache.h b/testsuites/libtests/dl03/dl-cache.h
new file mode 100644
index 0000000000..e46df4b939
--- /dev/null
+++ b/testsuites/libtests/dl03/dl-cache.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if !defined(_DL_CACHE_H_)
+#define _DL_CACHE_H_
+
+int dl_cache_test(void);
+
+#endif
diff --git a/testsuites/libtests/dl03/dl03.doc b/testsuites/libtests/dl03/dl03.doc
new file mode 100644
index 0000000000..4a325de9cc
--- /dev/null
+++ b/testsuites/libtests/dl03/dl03.doc
@@ -0,0 +1,28 @@
+# Copyright (c) 2014 Chris Johns <chrisj@rtems.org>
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.org/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: dl02
+
+directives:
+
+ dlopen
+ dlinfo
+ dlsym
+ dlclose
+
+concepts:
+
++ Load 2 interdependent ELF object files.
++ Check there are no unreolved externals. There should be unresolved
+ externals after the first lond and none after the second load.
++ Locate the rtems_main symbol in dl-o1.
++ Call the rtems_main sym and have that function call the second object.
+ Call the second download with a callback handler to a symbol in the first
+ object file.
++ Unload the ELF files.
diff --git a/testsuites/libtests/dl03/dl03.scn b/testsuites/libtests/dl03/dl03.scn
new file mode 100644
index 0000000000..aee8eb7dbb
--- /dev/null
+++ b/testsuites/libtests/dl03/dl03.scn
@@ -0,0 +1,69 @@
+
+
+*** BEGIN OF TEST libdl (RTL) 3 ***
+cache create with large size
+rtl: alloc: new: OBJECT addr=0x0 size=4294967295
+cache create
+rtl: alloc: new: OBJECT addr=0x2038bc8 size=2048
+cache file open
+cache read: in: offset=0 length=1024
+rtl: cache: 3: fd=-1 offset=0 length=1024 area=[0,1024] cache=[0,0] size=0
+rtl: cache: 3: seek: offset=0 buffer_offset=0 read=2048 cache=[0,2048] dist=0
+cache read: out: offset=0 length=1024
+cache: buffer: 0000/0000 0001/0001 0002/0002 0003/0003
+cache read: in: offset=0 length=2048
+rtl: cache: 3: fd=3 offset=0 length=2048 area=[0,2048] cache=[0,2048] size=8192
+cache read: out: offset=0 length=2048
+cache: buffer: 0000/0000 0001/0001 0002/0002 0003/0003
+cache read: in: offset=1024 length=1024
+rtl: cache: 3: fd=3 offset=1024 length=1024 area=[1024,2048] cache=[0,2048] size=8192
+cache read: out: offset=1024 length=1024
+cache: buffer: 0200/0200 0201/0201 0202/0202 0203/0203
+cache read: in: offset=6144 length=2048
+rtl: cache: 3: fd=3 offset=6144 length=2048 area=[6144,8192] cache=[0,2048] size=8192
+rtl: cache: 3: seek: offset=6144 buffer_offset=0 read=2048 cache=[6144,8192] dist=2048
+cache read: out: offset=0 length=2048
+cache: buffer: 0c00/0c00 0c01/0c01 0c02/0c02 0c03/0c03
+cache read: in: offset=7168 length=1024
+rtl: cache: 3: fd=3 offset=7168 length=1024 area=[7168,8192] cache=[6144,8192] size=8192
+cache read: out: offset=1024 length=1024
+cache: buffer: 0e00/0e00 0e01/0e01 0e02/0e02 0e03/0e03
+cache read: in: offset=0 length=512
+rtl: cache: 3: fd=3 offset=0 length=512 area=[0,512] cache=[6144,8192] size=8192
+rtl: cache: 3: seek: offset=0 buffer_offset=0 read=2048 cache=[0,2048] dist=8192
+cache read: out: offset=0 length=512
+cache: buffer: 0000/0000 0001/0001 0002/0002 0003/0003
+cache read: in: offset=0 length=256
+rtl: cache: 3: fd=3 offset=0 length=256 area=[0,256] cache=[0,2048] size=8192
+cache read: out: offset=0 length=256
+cache: buffer: 0000/0000 0001/0001 0002/0002 0003/0003
+cache read: in: offset=0 length=2048
+rtl: cache: 3: fd=3 offset=0 length=2048 area=[0,2048] cache=[0,2048] size=8192
+cache read: out: offset=0 length=2048
+cache: buffer: 0000/0000 0001/0001 0002/0002 0003/0003
+cache read: in: offset=8152 length=16
+rtl: cache: 3: fd=3 offset=8152 length=16 area=[8152,8168] cache=[0,2048] size=8192
+rtl: cache: 3: seek: offset=8152 buffer_offset=0 read=40 cache=[8152,8192] dist=40
+cache read: out: offset=0 length=16
+cache: buffer: 0fec/0fec 0fed/0fed 0fee/0fee 0fef/0fef
+cache read: in: offset=8152 length=40
+rtl: cache: 3: fd=3 offset=8152 length=40 area=[8152,8192] cache=[8152,8192] size=8192
+cache read: out: offset=0 length=40
+cache: buffer: 0fec/0fec 0fed/0fed 0fee/0fee 0fef/0fef
+cache read: in: offset=8152 length=80
+rtl: cache: 3: fd=3 offset=8152 length=80 area=[8152,8232] cache=[8152,8192] size=8192
+rtl: cache: 3: truncate length=40
+cache read: out: offset=0 length=40
+cache: buffer: 0fec/0fec 0fed/0fed 0fee/0fee 0fef/0fef
+cache read: in: offset=6224 length=20
+rtl: cache: 3: fd=3 offset=6224 length=20 area=[6224,6244] cache=[8152,8192] size=8192
+rtl: cache: 3: seek: offset=6224 buffer_offset=0 read=1968 cache=[6224,8192] dist=1968
+cache read: out: offset=0 length=20
+cache: buffer: 0c28/0c28 0c29/0c29 0c2a/0c2a 0c2b/0c2b
+cache read: in: offset=8152 length=40
+rtl: cache: 3: fd=3 offset=8152 length=40 area=[8152,8192] cache=[6224,8192] size=8192
+cache read: out: offset=1928 length=40
+cache: buffer: 0fec/0fec 0fed/0fed 0fee/0fee 0fef/0fef
+rtl: cache: 3: close
+rtl: alloc: del: OBJECT addr=0x2038bc8
+*** END OF TEST libdl (RTL) 3 ***
diff --git a/testsuites/libtests/dl03/init.c b/testsuites/libtests/dl03/init.c
new file mode 100644
index 0000000000..ae8272294c
--- /dev/null
+++ b/testsuites/libtests/dl03/init.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <errno.h>
+#include <string.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include "dl-cache.h"
+
+const char rtems_test_name[] = "libdl (RTL) 3";
+
+/* forward declarations to avoid warnings */
+static rtems_task Init(rtems_task_argument argument);
+
+static int test(void)
+{
+ int ret;
+ ret = dl_cache_test();
+ if (ret)
+ rtems_test_exit(ret);
+ return 0;
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ test();
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (8U * 1024U)
+
+#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/dl04/Makefile.am b/testsuites/libtests/dl04/Makefile.am
new file mode 100644
index 0000000000..d45bc87c4d
--- /dev/null
+++ b/testsuites/libtests/dl04/Makefile.am
@@ -0,0 +1,50 @@
+rtems_tests_PROGRAMS = dl04
+# include a C++ file in the source to trick automake into adding C++ rules <sigh>.
+dl04_SOURCES = init.c dl-load.c dl-cpp.cpp dl-tar.c dl-tar.h
+
+BUILT_SOURCES = dl-tar.c dl-tar.h
+
+dist_rtems_tests_DATA = dl04.scn dl04.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(dl04_OBJECTS)
+LINK_LIBS = $(dl04_LDLIBS)
+
+dl-o4.o: dl-o4.cpp
+
+dl.tar: dl-o4.o
+ @rm -f $@
+ $(PAX) -w -f $@ $<
+CLEANFILES += dl.tar
+
+dl-tar.c: dl.tar
+ $(BIN2C) -C $< $@
+CLEANFILES += dl-tar.c
+
+dl-tar.h: dl.tar
+ $(BIN2C) -H $< $@
+CLEANFILES += dl-tar.h
+
+dl04.pre$(EXEEXT): $(dl04_OBJECTS) $(dl04_DEPENDENCIES)
+ @rm -f dl04.pre$(EXEEXT)
+ $(make-exe)
+ rm -f dl04.pre.ralf
+
+dl04.pre: dl04.pre$(EXEEXT)
+ mv $< $@
+CLEANFILES += dl04.pre
+
+dl-sym.o: dl04.pre
+ rtems-syms -e -c "$(CFLAGS)" -o $@ $<
+
+dl04$(EXEEXT): $(dl04_OBJECTS) $(dl04_DEPENDENCIES) dl-sym.o
+ @rm -f dl04$(EXEEXT)
+ $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $(basename $@)$(EXEEXT) $(LINK_OBJS) dl-sym.o $(LINK_LIBS)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/dl04/dl-cpp.cpp b/testsuites/libtests/dl04/dl-cpp.cpp
new file mode 100644
index 0000000000..454de9004b
--- /dev/null
+++ b/testsuites/libtests/dl04/dl-cpp.cpp
@@ -0,0 +1,4 @@
+/* empty file to trick automake. */
+class empty
+{
+};
diff --git a/testsuites/libtests/dl04/dl-load.c b/testsuites/libtests/dl04/dl-load.c
new file mode 100644
index 0000000000..1409d79a9f
--- /dev/null
+++ b/testsuites/libtests/dl04/dl-load.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <stdio.h>
+
+#include <dlfcn.h>
+
+#include <rtems/rtl/rtl-trace.h>
+
+#include "dl-load.h"
+
+int dl_load_test(void)
+{
+ void* handle;
+ const char* err;
+
+ rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL);
+ handle = dlopen("/dl-o4.o", RTLD_GLOBAL | RTLD_NOW);
+ err = dlerror();
+ if (err != NULL)
+ printf("dlopen: %s\n", err);
+ rtems_test_assert(handle != NULL);
+ rtems_test_assert(dlclose(handle) == 0);
+
+ return 0;
+}
diff --git a/testsuites/libtests/dl04/dl-load.h b/testsuites/libtests/dl04/dl-load.h
new file mode 100644
index 0000000000..c1dca92438
--- /dev/null
+++ b/testsuites/libtests/dl04/dl-load.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if !defined(_DL_LOAD_H_)
+#define _DL_LOAD_H_
+
+int dl_load_test(void);
+
+#endif
diff --git a/testsuites/libtests/dl04/dl-o4.cpp b/testsuites/libtests/dl04/dl-o4.cpp
new file mode 100644
index 0000000000..e63afe385f
--- /dev/null
+++ b/testsuites/libtests/dl04/dl-o4.cpp
@@ -0,0 +1,30 @@
+class Foo {
+public:
+ Foo() {};
+ ~Foo() {};
+
+ virtual void f1() {};
+ virtual void f2() {};
+ virtual void f3() {};
+ virtual void f4() {};
+ virtual void f5() {};
+ virtual void f6() {};
+ virtual void f7() {};
+};
+
+class Bar : public Foo {
+};
+
+void baz(void)
+{
+ Bar b;
+
+ b.f1();
+}
+
+extern "C" {
+ void func(void)
+ {
+ baz();
+ }
+}
diff --git a/testsuites/libtests/dl04/dl04.doc b/testsuites/libtests/dl04/dl04.doc
new file mode 100644
index 0000000000..f36dc7b07f
--- /dev/null
+++ b/testsuites/libtests/dl04/dl04.doc
@@ -0,0 +1,21 @@
+# Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.org/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: dl04
+
+directives:
+
+ dlopen
+ dlerror
+ dlclose
+
+concepts:
+
++ Load a single ELF object file containing C++ code that tests the cache handling.
++ Unload the ELF file.
diff --git a/testsuites/libtests/dl04/dl04.scn b/testsuites/libtests/dl04/dl04.scn
new file mode 100644
index 0000000000..90732241a0
--- /dev/null
+++ b/testsuites/libtests/dl04/dl04.scn
@@ -0,0 +1,1004 @@
+
+
+*** BEGIN OF TEST libdl (RTL) 4 ***
+rtl: alloc: new: SYMBOL addr=0x2041f50 size=384
+rtl: alloc: new: OBJECT addr=0x20424e0 size=2048
+rtl: alloc: new: OBJECT addr=0x2042ce8 size=2048
+rtl: alloc: new: OBJECT addr=0x20434f0 size=2048
+rtl: alloc: new: OBJECT addr=0x2043cf8 size=2048
+rtl: alloc: new: OBJECT addr=0x2044500 size=144
+rtl: alloc: new: OBJECT addr=0x2040cf8 size=13
+rtl: alloc: new: OBJECT addr=0x2040d10 size=2
+rtl: adding global symbols, table size 21828
+rtl: global symbol add: 872
+rtl: alloc: new: SYMBOL addr=0x2044598 size=17440
+rtl: esyms: .div -> 0x2001510
+rtl: esyms: .rem -> 0x20017c0
+rtl: esyms: .udiv -> 0x2001508
+rtl: esyms: .umul -> 0x2001420
+rtl: esyms: .urem -> 0x20017b8
+rtl: esyms: BSP_output_char -> 0x2034ef4
+rtl: esyms: BSP_shared_interrupt_init -> 0x2004c70
+rtl: esyms: CLOCK_SPEED -> 0x20007e0
+rtl: esyms: Clock_driver_ticks -> 0x2036734
+rtl: esyms: Clock_exit -> 0x2004314
+rtl: esyms: Clock_initialize -> 0x2004404
+rtl: esyms: Clock_isr -> 0x2004364
+rtl: esyms: Configuration -> 0x202a46c
+rtl: esyms: Configuration_POSIX_API -> 0x2035584
+rtl: esyms: Configuration_RTEMS_API -> 0x2034e6c
+rtl: esyms: Console_Configuration_Count -> 0x2034ef8
+rtl: esyms: Console_Configuration_Ports -> 0x2034efc
+rtl: esyms: Console_Port_Count -> 0x2036290
+rtl: esyms: Console_Port_Data -> 0x2036288
+rtl: esyms: Console_Port_Minor -> 0x2036284
+rtl: esyms: Console_Port_Tbl -> 0x203628c
+rtl: esyms: ERC32_MEC -> 0x1f80000
+rtl: esyms: IMFS_LIMITS_AND_OPTIONS -> 0x2032908
+rtl: esyms: IMFS_chown -> 0x20059b0
+rtl: esyms: IMFS_create_node -> 0x2005a18
+rtl: esyms: IMFS_eval_path -> 0x2005ef4
+rtl: esyms: IMFS_fchmod -> 0x2005f0c
+rtl: esyms: IMFS_initialize_node -> 0x2005fb4
+rtl: esyms: IMFS_initialize_support -> 0x2006038
+rtl: esyms: IMFS_link -> 0x200624c
+rtl: esyms: IMFS_memfile_write -> 0x2006bac
+rtl: esyms: IMFS_mknod -> 0x2006df0
+rtl: esyms: IMFS_mknod_control_device -> 0x2032990
+rtl: esyms: IMFS_mknod_control_dir_default -> 0x2032938
+rtl: esyms: IMFS_mknod_control_enosys -> 0x20329e0
+rtl: esyms: IMFS_mknod_control_memfile -> 0x2032a40
+rtl: esyms: IMFS_mount -> 0x2006ea0
+rtl: esyms: IMFS_node_clone -> 0x20060ec
+rtl: esyms: IMFS_node_destroy -> 0x2006104
+rtl: esyms: IMFS_node_destroy_default -> 0x2005f88
+rtl: esyms: IMFS_node_free -> 0x2006120
+rtl: esyms: IMFS_node_initialize_default -> 0x2006160
+rtl: esyms: IMFS_node_initialize_directory -> 0x2005ab4
+rtl: esyms: IMFS_node_remove_default -> 0x2005f64
+rtl: esyms: IMFS_node_remove_directory -> 0x2005acc
+rtl: esyms: IMFS_readlink -> 0x20071b0
+rtl: esyms: IMFS_rename -> 0x2006f14
+rtl: esyms: IMFS_rmnod -> 0x2007014
+rtl: esyms: IMFS_stat -> 0x2007088
+rtl: esyms: IMFS_stat_file -> 0x20070e8
+rtl: esyms: IMFS_symlink -> 0x200714c
+rtl: esyms: IMFS_unmount -> 0x2007218
+rtl: esyms: IMFS_utime -> 0x200728c
+rtl: esyms: Initialization_tasks -> 0x2034ecc
+rtl: esyms: PROM_END -> 0x200000
+rtl: esyms: PROM_SIZE -> 0x200000
+rtl: esyms: PROM_START -> 0x0
+rtl: esyms: RAM_END -> 0x2400000
+rtl: esyms: RAM_SIZE -> 0x400000
+rtl: esyms: RAM_START -> 0x2000000
+rtl: esyms: RTEMS_Malloc_Area -> 0x20366c8
+rtl: esyms: RTEMS_Malloc_GC_list -> 0x2035030
+rtl: esyms: RTEMS_Malloc_Heap -> 0x2034ee8
+rtl: esyms: RTEMS_Malloc_Initialize -> 0x2007d94
+rtl: esyms: TOD_TICKS_PER_SECOND_method -> 0x2016f48
+rtl: esyms: Untar_FromMemory -> 0x201c2d0
+rtl: esyms: _API_Mutex_Allocate -> 0x2016700
+rtl: esyms: _API_Mutex_Initialization -> 0x20166d0
+rtl: esyms: _API_Mutex_Lock -> 0x2016764
+rtl: esyms: _API_Mutex_Unlock -> 0x2016944
+rtl: esyms: _API_extensions_Add -> 0x2016674
+rtl: esyms: _API_extensions_Initialization -> 0x2016658
+rtl: esyms: _API_extensions_List -> 0x2036f40
+rtl: esyms: _API_extensions_Run_postdriver -> 0x201668c
+rtl: esyms: _Balloc -> 0x201fdc4
+rtl: esyms: _Barrier_Information -> 0x2036b78
+rtl: esyms: _Barrier_Manager_initialization -> 0x20149fc
+rtl: esyms: _Bfree -> 0x201fe54
+rtl: esyms: _CORE_mutex_Flush -> 0x2016c04
+rtl: esyms: _CORE_mutex_Initialize -> 0x2016a74
+rtl: esyms: _CORE_mutex_Seize_interrupt_blocking -> 0x2016c10
+rtl: esyms: _CORE_mutex_Surrender -> 0x2016cc8
+rtl: esyms: _CORE_semaphore_Initialize -> 0x2016e84
+rtl: esyms: _CPU_Context_Initialize -> 0x201c0ec
+rtl: esyms: _CPU_Context_restore -> 0x2004db4
+rtl: esyms: _CPU_Context_restore_fp -> 0x201c22c
+rtl: esyms: _CPU_Context_restore_heir -> 0x2004cf4
+rtl: esyms: _CPU_Context_save_fp -> 0x201c1e0
+rtl: esyms: _CPU_Context_switch -> 0x2004cb8
+rtl: esyms: _CPU_Exception_frame_print -> 0x2005184
+rtl: esyms: _CPU_Fatal_halt -> 0x20041bc
+rtl: esyms: _CPU_ISR_Get_level -> 0x201bfcc
+rtl: esyms: _CPU_ISR_install_raw_handler -> 0x201bfe0
+rtl: esyms: _CPU_ISR_install_vector -> 0x201c0b0
+rtl: esyms: _CPU_Initialize -> 0x201bf8c
+rtl: esyms: _CPU_Null_fp_context -> 0x2036ea0
+rtl: esyms: _CPU_Trap_slot_template -> 0x2032548
+rtl: esyms: _Chain_Append -> 0x20169ec
+rtl: esyms: _Chain_Extract -> 0x2016a18
+rtl: esyms: _Chain_Get -> 0x2016a3c
+rtl: esyms: _Chain_Initialize -> 0x2016990
+rtl: esyms: _Debug_Level -> 0x2036e3c
+rtl: esyms: _Debug_Manager_initialization -> 0x20160f4
+rtl: esyms: _Dual_ported_memory_Information -> 0x2036bb4
+rtl: esyms: _Dual_ported_memory_Manager_initialization -> 0x2014a54
+rtl: esyms: _ERC32_MEC -> 0x1f80000
+rtl: esyms: _ERC32_MEC_Timer_Control_Mirror -> 0x20007c0
+rtl: esyms: _Event_Manager_initialization -> 0x2014a8c
+rtl: esyms: _Event_Seize -> 0x2014b14
+rtl: esyms: _Event_Surrender -> 0x2014d1c
+rtl: esyms: _Extension_Information -> 0x2036f4c
+rtl: esyms: _Extension_Manager_initialization -> 0x20161f8
+rtl: esyms: _Freechain_Initialize -> 0x2016f68
+rtl: esyms: _Freechain_Put -> 0x2016fac
+rtl: esyms: _Heap_Allocate_aligned_with_boundary -> 0x20173f4
+rtl: esyms: _Heap_Block_allocate -> 0x20172bc
+rtl: esyms: _Heap_Free -> 0x2017628
+rtl: esyms: _Heap_Get_first_and_last_block -> 0x2017100
+rtl: esyms: _Heap_Initialize -> 0x2017198
+rtl: esyms: _Heap_Resize_block -> 0x2017818
+rtl: esyms: _Heap_Size_of_alloc_area -> 0x2017930
+rtl: esyms: _IO_All_drivers_initialized -> 0x2036f88
+rtl: esyms: _IO_Driver_address_table -> 0x2034e9c
+rtl: esyms: _IO_Initialize_all_drivers -> 0x201626c
+rtl: esyms: _IO_Number_of_drivers -> 0x202a544
+rtl: esyms: _ISR_Handler -> 0x2004dc4
+rtl: esyms: _ISR_Handler_initialization -> 0x2017a08
+rtl: esyms: _ISR_Vector_table -> 0x20372b4
+rtl: esyms: _Internal_Objects -> 0x2036db8
+rtl: esyms: _Internal_errors_What_happened -> 0x20372a4
+rtl: esyms: _Message_queue_Information -> 0x2036bf0
+rtl: esyms: _Message_queue_Manager_initialization -> 0x2014e90
+rtl: esyms: _Objects_API_maximum_class -> 0x2018478
+rtl: esyms: _Objects_Allocate -> 0x2018460
+rtl: esyms: _Objects_Allocate_unprotected -> 0x2018394
+rtl: esyms: _Objects_Close -> 0x20184a0
+rtl: esyms: _Objects_Extend_information -> 0x20184bc
+rtl: esyms: _Objects_Free -> 0x2018828
+rtl: esyms: _Objects_Get -> 0x20188cc
+rtl: esyms: _Objects_Get_information -> 0x201897c
+rtl: esyms: _Objects_Get_information_id -> 0x20189f0
+rtl: esyms: _Objects_Get_isr_disable -> 0x2018a08
+rtl: esyms: _Objects_Information_table -> 0x2036da8
+rtl: esyms: _Objects_Initialize_information -> 0x2018a70
+rtl: esyms: _Objects_Namespace_remove -> 0x2018b48
+rtl: esyms: _Objects_Shrink_information -> 0x2018b70
+rtl: esyms: _Once -> 0x2018c6c
+rtl: esyms: _Once_Mutex -> 0x2036e34
+rtl: esyms: _POSIX_API_Initialize -> 0x20164f4
+rtl: esyms: _POSIX_Barrier_Information -> 0x2037130
+rtl: esyms: _POSIX_Barrier_Manager_initialization -> 0x2013d90
+rtl: esyms: _POSIX_Condition_variables_Information -> 0x20371c0
+rtl: esyms: _POSIX_Condition_variables_Manager_initialization -> 0x2013620
+rtl: esyms: _POSIX_Key_Manager_initialization -> 0x20136a4
+rtl: esyms: _POSIX_Keys_Information -> 0x2037184
+rtl: esyms: _POSIX_Keys_Key_value_compare -> 0x2013658
+rtl: esyms: _POSIX_Keys_Key_value_lookup_tree -> 0x20363fc
+rtl: esyms: _POSIX_Keys_Keypool -> 0x20371fc
+rtl: esyms: _POSIX_Keys_Run_destructors -> 0x201381c
+rtl: esyms: _POSIX_Message_queue_Information -> 0x20370b8
+rtl: esyms: _POSIX_Message_queue_Information_fds -> 0x203723c
+rtl: esyms: _POSIX_Message_queue_Manager_initialization -> 0x2013cc4
+rtl: esyms: _POSIX_Mutex_Default_attributes -> 0x203716c
+rtl: esyms: _POSIX_Mutex_Information -> 0x20370f4
+rtl: esyms: _POSIX_Mutex_Manager_initialization -> 0x2013d24
+rtl: esyms: _POSIX_Objects -> 0x2037208
+rtl: esyms: _POSIX_RWLock_Information -> 0x2036f8c
+rtl: esyms: _POSIX_RWLock_Manager_initialization -> 0x2013dc8
+rtl: esyms: _POSIX_Semaphore_Information -> 0x2037040
+rtl: esyms: _POSIX_Semaphore_Manager_initialization -> 0x2014990
+rtl: esyms: _POSIX_Spinlock_Information -> 0x2037004
+rtl: esyms: _POSIX_Spinlock_Manager_initialization -> 0x2014400
+rtl: esyms: _POSIX_Thread_Exit -> 0x201471c
+rtl: esyms: _POSIX_Threads_API_extensions -> 0x20350c0
+rtl: esyms: _POSIX_Threads_Default_attributes -> 0x20350cc
+rtl: esyms: _POSIX_Threads_Information -> 0x2036fc8
+rtl: esyms: _POSIX_Threads_Initialize_user_threads_p -> 0x2035580
+rtl: esyms: _POSIX_Threads_Manager_initialization -> 0x20146cc
+rtl: esyms: _POSIX_Threads_Sporadic_budget_TSR -> 0x2014490
+rtl: esyms: _POSIX_Threads_User_extensions -> 0x2035088
+rtl: esyms: _POSIX_Threads_cancel_run -> 0x2013584
+rtl: esyms: _POSIX_Timer_Information -> 0x203707c
+rtl: esyms: _POSIX_Timer_Manager_initialization -> 0x2014958
+rtl: esyms: _POSIX_signals_Abnormal_termination_handler -> 0x2013e00
+rtl: esyms: _POSIX_signals_Action_handler -> 0x2013e10
+rtl: esyms: _POSIX_signals_Check_signal -> 0x2013fb4
+rtl: esyms: _POSIX_signals_Clear_process_signals -> 0x2014088
+rtl: esyms: _POSIX_signals_Clear_signals -> 0x20140f0
+rtl: esyms: _POSIX_signals_Default_vectors -> 0x20344ec
+rtl: esyms: _POSIX_signals_Inactive_siginfo -> 0x20369d4
+rtl: esyms: _POSIX_signals_Manager_Initialization -> 0x2013efc
+rtl: esyms: _POSIX_signals_Pending -> 0x20369f4
+rtl: esyms: _POSIX_signals_Set_process_signals -> 0x2014248
+rtl: esyms: _POSIX_signals_Siginfo -> 0x20369f8
+rtl: esyms: _POSIX_signals_Unblock_thread -> 0x201426c
+rtl: esyms: _POSIX_signals_Vectors -> 0x2036854
+rtl: esyms: _POSIX_signals_Wait_queue -> 0x20369e0
+rtl: esyms: _PROM_END -> 0x200000
+rtl: esyms: _PROM_SIZE -> 0x200000
+rtl: esyms: _PROM_START -> 0x0
+rtl: esyms: _Partition_Information -> 0x2036c2c
+rtl: esyms: _Partition_Manager_initialization -> 0x2014ec8
+rtl: esyms: _Per_CPU_Information -> 0x20376e0
+rtl: esyms: _Protected_heap_Allocate_aligned_with_boundary -> 0x2018cd0
+rtl: esyms: _Protected_heap_Free -> 0x2018d08
+rtl: esyms: _Protected_heap_Get_block_size -> 0x2018d38
+rtl: esyms: _Protected_heap_Resize_block -> 0x2018d6c
+rtl: esyms: _RAM_END -> 0x2400000
+rtl: esyms: _RAM_SIZE -> 0x400000
+rtl: esyms: _RAM_START -> 0x2000000
+rtl: esyms: _RBTree_Extract -> 0x2019080
+rtl: esyms: _RBTree_Find -> 0x201922c
+rtl: esyms: _RBTree_Insert -> 0x201928c
+rtl: esyms: _RBTree_Next -> 0x201950c
+rtl: esyms: _RTEMS_API_Initialize -> 0x201655c
+rtl: esyms: _RTEMS_Allocator_Mutex -> 0x2036e38
+rtl: esyms: _RTEMS_Objects -> 0x2037278
+rtl: esyms: _RTEMS_Tasks_Invoke_task_variable_dtor -> 0x2015f60
+rtl: esyms: _RTEMS_tasks_API_extensions -> 0x2035150
+rtl: esyms: _RTEMS_tasks_Information -> 0x2036d5c
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks -> 0x2015e00
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks_body -> 0x2015a1c
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks_p -> 0x2034e60
+rtl: esyms: _RTEMS_tasks_Manager_initialization -> 0x2015e5c
+rtl: esyms: _RTEMS_tasks_User_extensions -> 0x2035118
+rtl: esyms: _RTEMS_version -> 0x20325b8
+rtl: esyms: _Rate_monotonic_Information -> 0x2036c68
+rtl: esyms: _Rate_monotonic_Manager_initialization -> 0x2014f00
+rtl: esyms: _Region_Information -> 0x2036ca4
+rtl: esyms: _Region_Manager_initialization -> 0x2014f38
+rtl: esyms: _SPARC_Counter -> 0x2035224
+rtl: esyms: _SPARC_Counter_difference_default -> 0x201c278
+rtl: esyms: _Scheduler_Handler_initialization -> 0x20195a4
+rtl: esyms: _Scheduler_Table -> 0x202a54c
+rtl: esyms: _Scheduler_default_Node_destroy -> 0x20195c4
+rtl: esyms: _Scheduler_default_Node_initialize -> 0x20195cc
+rtl: esyms: _Scheduler_default_Release_job -> 0x20195d4
+rtl: esyms: _Scheduler_default_Start_idle -> 0x20195dc
+rtl: esyms: _Scheduler_default_Tick -> 0x20195fc
+rtl: esyms: _Scheduler_priority_Block -> 0x20196f0
+rtl: esyms: _Scheduler_priority_Change_priority -> 0x2019860
+rtl: esyms: _Scheduler_priority_Initialize -> 0x20196a0
+rtl: esyms: _Scheduler_priority_Priority_compare -> 0x2019a70
+rtl: esyms: _Scheduler_priority_Schedule -> 0x2019a78
+rtl: esyms: _Scheduler_priority_Unblock -> 0x2019b60
+rtl: esyms: _Scheduler_priority_Update_priority -> 0x2019bfc
+rtl: esyms: _Scheduler_priority_Yield -> 0x2019c60
+rtl: esyms: _Semaphore_Information -> 0x2036d20
+rtl: esyms: _Semaphore_Manager_initialization -> 0x2014fb0
+rtl: esyms: _Semaphore_Translate_core_mutex_return_code_ -> 0x2034680
+rtl: esyms: _Semaphore_Translate_core_semaphore_return_code_ -> 0x203466c
+rtl: esyms: _Signal_Action_handler -> 0x2015718
+rtl: esyms: _Signal_Manager_initialization -> 0x2015710
+rtl: esyms: _System_state_Current -> 0x20372b0
+rtl: esyms: _TLS_Alignment -> 0x1
+rtl: esyms: _TLS_BSS_begin -> 0x2034e60
+rtl: esyms: _TLS_BSS_end -> 0x2034e60
+rtl: esyms: _TLS_BSS_size -> 0x0
+rtl: esyms: _TLS_Data_begin -> 0x2034e60
+rtl: esyms: _TLS_Data_size -> 0x0
+rtl: esyms: _TLS_Size -> 0x0
+rtl: esyms: _TOD -> 0x2036da0
+rtl: esyms: _TOD_Handler_initialization -> 0x2016eb4
+rtl: esyms: _TOD_Tickle_ticks -> 0x2016ee8
+rtl: esyms: _Terminate -> 0x20179b4
+rtl: esyms: _Thread_Allocated_fp -> 0x2036e30
+rtl: esyms: _Thread_Change_priority -> 0x2019e30
+rtl: esyms: _Thread_Clear_state -> 0x2019f50
+rtl: esyms: _Thread_Close -> 0x201b1bc
+rtl: esyms: _Thread_Control_add_on_count -> 0x202a4b0
+rtl: esyms: _Thread_Control_add_ons -> 0x202a4b4
+rtl: esyms: _Thread_Control_size -> 0x202a4d4
+rtl: esyms: _Thread_Create_idle -> 0x2019fb4
+rtl: esyms: _Thread_Dispatch -> 0x201a250
+rtl: esyms: _Thread_Do_dispatch -> 0x201a060
+rtl: esyms: _Thread_Get -> 0x201a2e0
+rtl: esyms: _Thread_Get_interrupt_disable -> 0x201a338
+rtl: esyms: _Thread_Global_construction -> 0x201a390
+rtl: esyms: _Thread_Handler -> 0x201a470
+rtl: esyms: _Thread_Handler_initialization -> 0x2019d78
+rtl: esyms: _Thread_Initialize -> 0x201a548
+rtl: esyms: _Thread_Internal_information -> 0x2036e5c
+rtl: esyms: _Thread_Kill_zombies -> 0x201af74
+rtl: esyms: _Thread_Life_action_handler -> 0x201b050
+rtl: esyms: _Thread_Load_environment -> 0x201a820
+rtl: esyms: _Thread_Raise_priority -> 0x2019f14
+rtl: esyms: _Thread_Restart -> 0x201b214
+rtl: esyms: _Thread_Restore_priority -> 0x2019f30
+rtl: esyms: _Thread_Set_life_protection -> 0x201b250
+rtl: esyms: _Thread_Set_priority -> 0x201b37c
+rtl: esyms: _Thread_Set_state -> 0x201b394
+rtl: esyms: _Thread_Stack_Allocate -> 0x201b3dc
+rtl: esyms: _Thread_Stack_Free -> 0x201b41c
+rtl: esyms: _Thread_Start -> 0x201b444
+rtl: esyms: _Thread_Start_multitasking -> 0x201b4d4
+rtl: esyms: _Thread_Timeout -> 0x201b4f0
+rtl: esyms: _Thread_Yield -> 0x201b594
+rtl: esyms: _Thread_queue_Compare_priority -> 0x201a88c
+rtl: esyms: _Thread_queue_Dequeue -> 0x201ab94
+rtl: esyms: _Thread_queue_Enqueue_critical -> 0x201a8f4
+rtl: esyms: _Thread_queue_Extract -> 0x201ab54
+rtl: esyms: _Thread_queue_Extract_critical -> 0x201ab24
+rtl: esyms: _Thread_queue_Extract_locked -> 0x201aa2c
+rtl: esyms: _Thread_queue_Extract_with_proxy -> 0x201abe8
+rtl: esyms: _Thread_queue_Flush -> 0x201abf4
+rtl: esyms: _Thread_queue_Initialize -> 0x201a8a8
+rtl: esyms: _Thread_queue_Operations_FIFO -> 0x2034838
+rtl: esyms: _Thread_queue_Operations_default -> 0x203484c
+rtl: esyms: _Thread_queue_Operations_priority -> 0x2034824
+rtl: esyms: _Thread_queue_Unblock_critical -> 0x201aa5c
+rtl: esyms: _Timecounter -> 0x203517c
+rtl: esyms: _Timecounter_Bintime -> 0x2017f00
+rtl: esyms: _Timecounter_Binuptime -> 0x2017e40
+rtl: esyms: _Timecounter_Boottimebin -> 0x20376b8
+rtl: esyms: _Timecounter_Initialize -> 0x2018364
+rtl: esyms: _Timecounter_Install -> 0x2017fec
+rtl: esyms: _Timecounter_Microtime -> 0x2017f78
+rtl: esyms: _Timecounter_Set_clock -> 0x2018028
+rtl: esyms: _Timecounter_Tick_simple -> 0x20181c0
+rtl: esyms: _Timecounter_Time_second -> 0x2035174
+rtl: esyms: _Timecounter_Time_uptime -> 0x2035170
+rtl: esyms: _Timer_Information -> 0x2036ce0
+rtl: esyms: _Timer_Manager_initialization -> 0x2014f70
+rtl: esyms: _Timer_server -> 0x2036d1c
+rtl: esyms: _Timespec_To_ticks -> 0x201b5d4
+rtl: esyms: _Unwind_Find_FDE -> 0x2003fb0
+rtl: esyms: _User_extensions_Add_set -> 0x201b6c8
+rtl: esyms: _User_extensions_Fatal_visitor -> 0x201b820
+rtl: esyms: _User_extensions_Handler_initialization -> 0x201b688
+rtl: esyms: _User_extensions_Iterate -> 0x201b870
+rtl: esyms: _User_extensions_List -> 0x2035218
+rtl: esyms: _User_extensions_Switches_list -> 0x203520c
+rtl: esyms: _User_extensions_Thread_begin_visitor -> 0x201b7d8
+rtl: esyms: _User_extensions_Thread_create_visitor -> 0x201b728
+rtl: esyms: _User_extensions_Thread_delete_visitor -> 0x201b76c
+rtl: esyms: _User_extensions_Thread_exitted_visitor -> 0x201b7fc
+rtl: esyms: _User_extensions_Thread_restart_visitor -> 0x201b7b4
+rtl: esyms: _User_extensions_Thread_start_visitor -> 0x201b790
+rtl: esyms: _User_extensions_Thread_terminate_visitor -> 0x201b84c
+rtl: esyms: _Watchdog_Handler_initialization -> 0x201b900
+rtl: esyms: _Watchdog_Insert -> 0x201baac
+rtl: esyms: _Watchdog_Remove -> 0x201bbac
+rtl: esyms: _Watchdog_Seconds_header -> 0x2036e40
+rtl: esyms: _Watchdog_Tick -> 0x201bcc4
+rtl: esyms: _Watchdog_Tickle -> 0x201bc10
+rtl: esyms: _Watchdog_Ticks_header -> 0x2036f28
+rtl: esyms: _Watchdog_Ticks_since_boot -> 0x2037718
+rtl: esyms: _Workspace_Allocate -> 0x201bef8
+rtl: esyms: _Workspace_Allocate_aligned -> 0x201bf18
+rtl: esyms: _Workspace_Allocate_or_fatal_error -> 0x201bf50
+rtl: esyms: _Workspace_Area -> 0x2036dc8
+rtl: esyms: _Workspace_Free -> 0x201bf38
+rtl: esyms: _Workspace_Handler_initialization -> 0x201bd20
+rtl: esyms: __DTOR_END__ -> 0x202a44c
+rtl: esyms: __DYNAMIC -> 0x0
+rtl: esyms: __TMC_END__ -> 0x2035560
+rtl: esyms: __any_on -> 0x2020c30
+rtl: esyms: __ascii_wctomb -> 0x2029ef0
+rtl: esyms: __b2d -> 0x20208b4
+rtl: esyms: __bss_start -> 0x2035560
+rtl: esyms: __call_exitprocs -> 0x201c6a8
+rtl: esyms: __clz_tab -> 0x2032438
+rtl: esyms: __copybits -> 0x2020bb0
+rtl: esyms: __ctype_ptr__ -> 0x203522c
+rtl: esyms: __d2b -> 0x20209d4
+rtl: esyms: __deregister_frame -> 0x2003f84
+rtl: esyms: __deregister_frame_info -> 0x2003f78
+rtl: esyms: __deregister_frame_info_bases -> 0x2003e3c
+rtl: esyms: __divdi3 -> 0x2001b30
+rtl: esyms: __end -> 0x2037720
+rtl: esyms: __errno -> 0x201de3c
+rtl: esyms: __fp_lock_all -> 0x201e598
+rtl: esyms: __fp_unlock_all -> 0x201e5b0
+rtl: esyms: __fpclassifyd -> 0x2021144
+rtl: esyms: __fputwc -> 0x201e7d0
+rtl: esyms: __getreent -> 0x2001318
+rtl: esyms: __hi0bits -> 0x2020040
+rtl: esyms: __i2b -> 0x2020194
+rtl: esyms: __lo0bits -> 0x20200c8
+rtl: esyms: __locale_charset -> 0x201f6d8
+rtl: esyms: __locale_cjk_lang -> 0x201f6fc
+rtl: esyms: __locale_mb_cur_max -> 0x201f6e4
+rtl: esyms: __locale_msgcharset -> 0x201f6f0
+rtl: esyms: __log2table -> 0x2034718
+rtl: esyms: __lshift -> 0x202050c
+rtl: esyms: __mb_cur_max -> 0x2035558
+rtl: esyms: __mcmp -> 0x202063c
+rtl: esyms: __mdiff -> 0x20206a8
+rtl: esyms: __moddi3 -> 0x2001f50
+rtl: esyms: __mprec_bigtens -> 0x2034c60
+rtl: esyms: __mprec_tens -> 0x2034c88
+rtl: esyms: __mprec_tinytens -> 0x2034c38
+rtl: esyms: __muldi3 -> 0x2001a68
+rtl: esyms: __multadd -> 0x201fe80
+rtl: esyms: __multiply -> 0x20201b8
+rtl: esyms: __pow5mult -> 0x20203e8
+rtl: esyms: __ratio -> 0x2020ae4
+rtl: esyms: __register_exitproc -> 0x201c5b4
+rtl: esyms: __register_frame -> 0x2003d80
+rtl: esyms: __register_frame_info -> 0x2003d4c
+rtl: esyms: __register_frame_info_bases -> 0x2003d1c
+rtl: esyms: __register_frame_info_table -> 0x2003e0c
+rtl: esyms: __register_frame_info_table_bases -> 0x2003db0
+rtl: esyms: __register_frame_table -> 0x2003e20
+rtl: esyms: __s2b -> 0x201ff68
+rtl: esyms: __sclose -> 0x202138c
+rtl: esyms: __seofread -> 0x20212c8
+rtl: esyms: __sflags -> 0x201e630
+rtl: esyms: __sflush_r -> 0x201df9c
+rtl: esyms: __sfmoreglue -> 0x201e3f8
+rtl: esyms: __sfp -> 0x201e444
+rtl: esyms: __sfp_lock_acquire -> 0x201e578
+rtl: esyms: __sfp_lock_release -> 0x201e580
+rtl: esyms: __sfvwrite_r -> 0x201ef94
+rtl: esyms: __sinit -> 0x201e554
+rtl: esyms: __sinit_lock_acquire -> 0x201e588
+rtl: esyms: __sinit_lock_release -> 0x201e590
+rtl: esyms: __smakebuf_r -> 0x201f740
+rtl: esyms: __sprint_r -> 0x2025b80
+rtl: esyms: __sread -> 0x2021274
+rtl: esyms: __srefill_r -> 0x2020f44
+rtl: esyms: __sseek -> 0x2021318
+rtl: esyms: __ssprint_r -> 0x2021d94
+rtl: esyms: __start_set_sysctl_set -> 0x2034e60
+rtl: esyms: __stop_set_sysctl_set -> 0x2034e60
+rtl: esyms: __swbuf -> 0x2029dcc
+rtl: esyms: __swbuf_r -> 0x2029c4c
+rtl: esyms: __swrite -> 0x20212d0
+rtl: esyms: __swsetup_r -> 0x2029f5c
+rtl: esyms: __udivdi3 -> 0x2002370
+rtl: esyms: __ulp -> 0x2020824
+rtl: esyms: __umoddi3 -> 0x20026c8
+rtl: esyms: __wctomb -> 0x203555c
+rtl: esyms: _bss_start -> 0x2035560
+rtl: esyms: _calloc_r -> 0x2007410
+rtl: esyms: _cleanup -> 0x201e538
+rtl: esyms: _cleanup_r -> 0x201e2ac
+rtl: esyms: _close_r -> 0x2007730
+rtl: esyms: _ctype_ -> 0x2034918
+rtl: esyms: _data_start -> 0x2034e60
+rtl: esyms: _dtoa_r -> 0x201cae4
+rtl: esyms: _edata -> 0x2035560
+rtl: esyms: _end -> 0x2037720
+rtl: esyms: _endtext -> 0x2034e60
+rtl: esyms: _erodata -> 0x2034e30
+rtl: esyms: _etext -> 0x2034e28
+rtl: esyms: _exit -> 0x20083cc
+rtl: esyms: _fclose_r -> 0x201de8c
+rtl: esyms: _fflush_r -> 0x201e21c
+rtl: esyms: _fini -> 0x2034e48
+rtl: esyms: _fiprintf_r -> 0x201e5c8
+rtl: esyms: _fopen_r -> 0x201e6e0
+rtl: esyms: _fputwc_r -> 0x201e904
+rtl: esyms: _free_r -> 0x2007424
+rtl: esyms: _fseek_r -> 0x201e974
+rtl: esyms: _fseeko_r -> 0x201e9b0
+rtl: esyms: _fstat_r -> 0x2007884
+rtl: esyms: _fwalk -> 0x201f488
+rtl: esyms: _fwalk_reent -> 0x201f4fc
+rtl: esyms: _fwrite_r -> 0x201f57c
+rtl: esyms: _getpid_r -> 0x2007964
+rtl: esyms: _gettimeofday_r -> 0x2007350
+rtl: esyms: _global_atexit -> 0x20365e0
+rtl: esyms: _global_impure_ptr -> 0x2034c18
+rtl: esyms: _impure_ptr -> 0x2035230
+rtl: esyms: _init -> 0x2034e28
+rtl: esyms: _isatty -> 0x201c818
+rtl: esyms: _isatty_r -> 0x20079fc
+rtl: esyms: _kill_r -> 0x201391c
+rtl: esyms: _localeconv_r -> 0x201f704
+rtl: esyms: _lseek_r -> 0x2007c54
+rtl: esyms: _malloc_r -> 0x2007434
+rtl: esyms: _mprec_log10 -> 0x2020b70
+rtl: esyms: _open_r -> 0x2008734
+rtl: esyms: _printf_r -> 0x2020ce4
+rtl: esyms: _puts_r -> 0x2020d50
+rtl: esyms: _raise_r -> 0x2020df0
+rtl: esyms: _read_r -> 0x20088fc
+rtl: esyms: _realloc_r -> 0x2007444
+rtl: esyms: _reclaim_reent -> 0x2020e40
+rtl: esyms: _rodata_start -> 0x202a450
+rtl: esyms: _rtld_debug -> 0x2036848
+rtl: esyms: _rtld_debug_state -> 0x200cd88
+rtl: esyms: _rtld_linkmap_add -> 0x200cd90
+rtl: esyms: _rtld_linkmap_delete -> 0x200ce60
+rtl: esyms: _sdata -> 0x2034e60
+rtl: esyms: _setlocale_r -> 0x201f66c
+rtl: esyms: _strtoul_r -> 0x20219e0
+rtl: esyms: _svfiprintf_r -> 0x2021f68
+rtl: esyms: _svfprintf_r -> 0x2023208
+rtl: esyms: _text_start -> 0x2000000
+rtl: esyms: _vfiprintf_r -> 0x2025ba4
+rtl: esyms: _vfprintf_r -> 0x2027328
+rtl: esyms: _vsnprintf_r -> 0x2029b5c
+rtl: esyms: _wcrtomb_r -> 0x2029de8
+rtl: esyms: _wctomb_r -> 0x2029f2c
+rtl: esyms: _write_r -> 0x200c4bc
+rtl: esyms: abort -> 0x201c87c
+rtl: esyms: atexit -> 0x201c894
+rtl: esyms: bcopy -> 0x201c8b0
+rtl: esyms: boot_card -> 0x200415c
+rtl: esyms: bsp_boot_cmdline -> 0x2036730
+rtl: esyms: bsp_console_select -> 0x20048bc
+rtl: esyms: bsp_fatal_extension -> 0x200420c
+rtl: esyms: bsp_idle_thread -> 0x2004284
+rtl: esyms: bsp_interrupt_facility_initialize -> 0x2004cb0
+rtl: esyms: bsp_interrupt_handler_default -> 0x2004be0
+rtl: esyms: bsp_interrupt_handler_table -> 0x2036738
+rtl: esyms: bsp_interrupt_initialize -> 0x2004c04
+rtl: esyms: bsp_isr_handler -> 0x20041d0
+rtl: esyms: bsp_libc_init -> 0x2004298
+rtl: esyms: bsp_postdriver_hook -> 0x20042b4
+rtl: esyms: bsp_predriver_hook -> 0x20042d0
+rtl: esyms: bsp_pretasking_hook -> 0x20042dc
+rtl: esyms: bsp_spurious_initialize -> 0x20052e8
+rtl: esyms: bsp_start -> 0x20042e8
+rtl: esyms: bsp_work_area_initialize -> 0x200422c
+rtl: esyms: bss_start -> 0x2035560
+rtl: esyms: calloc -> 0x20072e4
+rtl: esyms: cleanup_glue -> 0x2020e1c
+rtl: esyms: close -> 0x20076b4
+rtl: esyms: console_close -> 0x20046c0
+rtl: esyms: console_control -> 0x200489c
+rtl: esyms: console_inbyte_nonblocking -> 0x2004a34
+rtl: esyms: console_initialize -> 0x2004740
+rtl: esyms: console_open -> 0x2004574
+rtl: esyms: console_outbyte_polled -> 0x20049e4
+rtl: esyms: console_read -> 0x20048ac
+rtl: esyms: console_write -> 0x20049ac
+rtl: esyms: data_start -> 0x2034e60
+rtl: esyms: device_close -> 0x2005948
+rtl: esyms: device_ftruncate -> 0x20059a8
+rtl: esyms: device_ioctl -> 0x2005990
+rtl: esyms: device_open -> 0x2005930
+rtl: esyms: device_read -> 0x2005960
+rtl: esyms: device_write -> 0x2005978
+rtl: esyms: dl_load_test -> 0x2001324
+rtl: esyms: dl_tar -> 0x202a6f0
+rtl: esyms: dl_tar_size -> 0x202a6e8
+rtl: esyms: dlclose -> 0x200c558
+rtl: esyms: dlerror -> 0x200c5dc
+rtl: esyms: dlopen -> 0x200c4d4
+rtl: esyms: early_mem -> 0x2034ef0
+rtl: esyms: edata -> 0x2035560
+rtl: esyms: end -> 0x2037720
+rtl: esyms: erc32_fns -> 0x2032578
+rtl: esyms: etext -> 0x2034e30
+rtl: esyms: exit -> 0x201de50
+rtl: esyms: fastlz_decompress -> 0x200c5fc
+rtl: esyms: fclose -> 0x201df88
+rtl: esyms: fflush -> 0x201e26c
+rtl: esyms: fiprintf -> 0x201e5f8
+rtl: esyms: fopen -> 0x201e7b4
+rtl: esyms: fputwc -> 0x201e934
+rtl: esyms: free -> 0x2007740
+rtl: esyms: frexp -> 0x20211cc
+rtl: esyms: fseek -> 0x201e990
+rtl: esyms: fseeko -> 0x201ef68
+rtl: esyms: fstat -> 0x20077e4
+rtl: esyms: ftruncate -> 0x2007898
+rtl: esyms: fwrite -> 0x201f634
+rtl: esyms: getegid -> 0x200792c
+rtl: esyms: geteuid -> 0x2007944
+rtl: esyms: getpid -> 0x200795c
+rtl: esyms: gettimeofday -> 0x2007318
+rtl: esyms: hard_reset -> 0x2001000
+rtl: esyms: imfs_memfile_bytes_per_block -> 0x203629c
+rtl: esyms: imfs_rq_memfile_bytes_per_block -> 0x2034eec
+rtl: esyms: isatty -> 0x201f660
+rtl: esyms: killinfo -> 0x2013934
+rtl: esyms: libc_init -> 0x20083f4
+rtl: esyms: libchip_serial_default_probe -> 0x2005064
+rtl: esyms: localeconv -> 0x201f72c
+rtl: esyms: lseek -> 0x2007bdc
+rtl: esyms: malloc -> 0x2007c74
+rtl: esyms: malloc_deferred_free -> 0x2007d7c
+rtl: esyms: malloc_deferred_frees_process -> 0x2007d48
+rtl: esyms: malloc_is_system_state_OK -> 0x2007d20
+rtl: esyms: memchr -> 0x201f8c8
+rtl: esyms: memcmp -> 0x201f9e4
+rtl: esyms: memcpy -> 0x201fa80
+rtl: esyms: memfile_blocks_allocated -> 0x20362a0
+rtl: esyms: memmove -> 0x201fb74
+rtl: esyms: memset -> 0x201fcb0
+rtl: esyms: mkdir -> 0x2007e20
+rtl: esyms: mknod -> 0x2007ee8
+rtl: esyms: mount -> 0x2008074
+rtl: esyms: newlib_create_hook -> 0x20083fc
+rtl: esyms: newlib_terminate_hook -> 0x20084b4
+rtl: esyms: open -> 0x20084c4
+rtl: esyms: printf -> 0x2020d18
+rtl: esyms: printk -> 0x20087c0
+rtl: esyms: pthread_exit -> 0x2014858
+rtl: esyms: pthread_getspecific -> 0x2013760
+rtl: esyms: pthread_key_create -> 0x20136f4
+rtl: esyms: pthread_kill -> 0x201486c
+rtl: esyms: pthread_self -> 0x201494c
+rtl: esyms: puts -> 0x2020ddc
+rtl: esyms: raise -> 0x2020e08
+rtl: esyms: rdb_start -> 0x20007c0
+rtl: esyms: read -> 0x200885c
+rtl: esyms: realloc -> 0x2008914
+rtl: esyms: rtems_ada_self -> 0x2036e58
+rtl: esyms: rtems_assoc_local_by_remote -> 0x2007458
+rtl: esyms: rtems_assoc_local_by_remote_bitfield -> 0x2007488
+rtl: esyms: rtems_assoc_ptr_by_local -> 0x20074d4
+rtl: esyms: rtems_assoc_ptr_by_remote -> 0x2007554
+rtl: esyms: rtems_assoc_remote_by_local -> 0x20075d4
+rtl: esyms: rtems_cache_get_instruction_line_size -> 0x200537c
+rtl: esyms: rtems_cache_get_maximal_line_size -> 0x2005384
+rtl: esyms: rtems_cache_instruction_sync_after_code_change -> 0x200538c
+rtl: esyms: rtems_cache_invalidate_entire_instruction -> 0x2005374
+rtl: esyms: rtems_clock_get_ticks_per_second -> 0x2014a34
+rtl: esyms: rtems_counter_initialize_converter -> 0x2016078
+rtl: esyms: rtems_current_user_env_get -> 0x20087f0
+rtl: esyms: rtems_current_user_env_key -> 0x2036838
+rtl: esyms: rtems_deviceio_close -> 0x2008bbc
+rtl: esyms: rtems_deviceio_control -> 0x2008cc4
+rtl: esyms: rtems_deviceio_open -> 0x2008b88
+rtl: esyms: rtems_deviceio_read -> 0x2008bec
+rtl: esyms: rtems_deviceio_write -> 0x2008c58
+rtl: esyms: rtems_event_receive -> 0x2014a94
+rtl: esyms: rtems_event_send -> 0x2014cd4
+rtl: esyms: rtems_event_system_send -> 0x20157f0
+rtl: esyms: rtems_fatal -> 0x2016248
+rtl: esyms: rtems_fatal_error_occurred -> 0x2016230
+rtl: esyms: rtems_filesystem_check_access -> 0x2008a98
+rtl: esyms: rtems_filesystem_default_are_nodes_equal -> 0x2005540
+rtl: esyms: rtems_filesystem_default_close -> 0x2005558
+rtl: esyms: rtems_filesystem_default_eval_path -> 0x2005560
+rtl: esyms: rtems_filesystem_default_fcntl -> 0x2005574
+rtl: esyms: rtems_filesystem_default_freenode -> 0x200557c
+rtl: esyms: rtems_filesystem_default_fstat -> 0x2005584
+rtl: esyms: rtems_filesystem_default_fsunmount -> 0x2005594
+rtl: esyms: rtems_filesystem_default_fsync_or_fdatasync -> 0x200559c
+rtl: esyms: rtems_filesystem_default_fsync_or_fdatasync_success -> 0x20055b8
+rtl: esyms: rtems_filesystem_default_ftruncate -> 0x20055c0
+rtl: esyms: rtems_filesystem_default_ftruncate_directory -> 0x20055dc
+rtl: esyms: rtems_filesystem_default_ioctl -> 0x20055f8
+rtl: esyms: rtems_filesystem_default_kqfilter -> 0x2005614
+rtl: esyms: rtems_filesystem_default_lock -> 0x200561c
+rtl: esyms: rtems_filesystem_default_lseek -> 0x200564c
+rtl: esyms: rtems_filesystem_default_lseek_directory -> 0x200566c
+rtl: esyms: rtems_filesystem_default_lseek_file -> 0x20056b4
+rtl: esyms: rtems_filesystem_default_open -> 0x20057d4
+rtl: esyms: rtems_filesystem_default_pathconf -> 0x2032c54
+rtl: esyms: rtems_filesystem_default_poll -> 0x20057dc
+rtl: esyms: rtems_filesystem_default_read -> 0x20057e4
+rtl: esyms: rtems_filesystem_default_readv -> 0x2005800
+rtl: esyms: rtems_filesystem_default_statvfs -> 0x200587c
+rtl: esyms: rtems_filesystem_default_unlock -> 0x2005638
+rtl: esyms: rtems_filesystem_default_write -> 0x2005898
+rtl: esyms: rtems_filesystem_default_writev -> 0x20058b4
+rtl: esyms: rtems_filesystem_do_unmount -> 0x2009504
+rtl: esyms: rtems_filesystem_eval_path_check_access -> 0x2008b54
+rtl: esyms: rtems_filesystem_eval_path_cleanup -> 0x2009130
+rtl: esyms: rtems_filesystem_eval_path_cleanup_with_parent -> 0x200916c
+rtl: esyms: rtems_filesystem_eval_path_continue -> 0x2008e40
+rtl: esyms: rtems_filesystem_eval_path_eat_delimiter -> 0x20098d8
+rtl: esyms: rtems_filesystem_eval_path_error -> 0x2008d44
+rtl: esyms: rtems_filesystem_eval_path_generic -> 0x2009298
+rtl: esyms: rtems_filesystem_eval_path_next_token -> 0x2009950
+rtl: esyms: rtems_filesystem_eval_path_recursive -> 0x20091e4
+rtl: esyms: rtems_filesystem_eval_path_restart -> 0x2009180
+rtl: esyms: rtems_filesystem_eval_path_start -> 0x200900c
+rtl: esyms: rtems_filesystem_eval_path_start_with_parent -> 0x2009038
+rtl: esyms: rtems_filesystem_eval_path_start_with_root_and_current -> 0x2008eb4
+rtl: esyms: rtems_filesystem_get_mount_handler -> 0x200803c
+rtl: esyms: rtems_filesystem_global_location_assign -> 0x200978c
+rtl: esyms: rtems_filesystem_global_location_null -> 0x2034fcc
+rtl: esyms: rtems_filesystem_global_location_obtain -> 0x2009638
+rtl: esyms: rtems_filesystem_global_location_release -> 0x2009724
+rtl: esyms: rtems_filesystem_handlers_default -> 0x20328cc
+rtl: esyms: rtems_filesystem_initialize -> 0x2007604
+rtl: esyms: rtems_filesystem_iterate -> 0x2007f78
+rtl: esyms: rtems_filesystem_location_clone -> 0x200766c
+rtl: esyms: rtems_filesystem_location_copy -> 0x2009498
+rtl: esyms: rtems_filesystem_location_copy_and_detach -> 0x2009844
+rtl: esyms: rtems_filesystem_location_detach -> 0x20094e8
+rtl: esyms: rtems_filesystem_location_free -> 0x200779c
+rtl: esyms: rtems_filesystem_location_remove_from_mt_entry -> 0x20097b4
+rtl: esyms: rtems_filesystem_location_transform_to_global -> 0x200986c
+rtl: esyms: rtems_filesystem_mknod -> 0x2007e3c
+rtl: esyms: rtems_filesystem_mount_table -> 0x2035048
+rtl: esyms: rtems_filesystem_null_handlers -> 0x2032b28
+rtl: esyms: rtems_filesystem_null_mt_entry -> 0x2034ff0
+rtl: esyms: rtems_filesystem_root_configuration -> 0x202a588
+rtl: esyms: rtems_filesystem_table -> 0x202a604
+rtl: esyms: rtems_fs_init_helper -> 0x202a618
+rtl: esyms: rtems_get_version_string -> 0x2016260
+rtl: esyms: rtems_global_user_env -> 0x2034f84
+rtl: esyms: rtems_gxx_mutex_init -> 0x2007978
+rtl: esyms: rtems_gxx_mutex_lock -> 0x20079bc
+rtl: esyms: rtems_gxx_mutex_unlock -> 0x20079e0
+rtl: esyms: rtems_gxx_once -> 0x200796c
+rtl: esyms: rtems_heap_null_extend -> 0x2008a24
+rtl: esyms: rtems_initialize_before_drivers -> 0x20161ac
+rtl: esyms: rtems_initialize_data_structures -> 0x2016100
+rtl: esyms: rtems_initialize_device_drivers -> 0x20161b4
+rtl: esyms: rtems_initialize_start_multitasking -> 0x20161c8
+rtl: esyms: rtems_interrupt_catch -> 0x2014e40
+rtl: esyms: rtems_io_close -> 0x20162b8
+rtl: esyms: rtems_io_control -> 0x2016318
+rtl: esyms: rtems_io_initialize -> 0x2016378
+rtl: esyms: rtems_io_open -> 0x20163d4
+rtl: esyms: rtems_io_read -> 0x2016434
+rtl: esyms: rtems_io_register_name -> 0x20072b4
+rtl: esyms: rtems_io_write -> 0x2016494
+rtl: esyms: rtems_libio_allocate -> 0x2007a40
+rtl: esyms: rtems_libio_exit -> 0x2007adc
+rtl: esyms: rtems_libio_exit_helper -> 0x202a61c
+rtl: esyms: rtems_libio_fcntl_flags -> 0x2007a0c
+rtl: esyms: rtems_libio_free -> 0x2007a98
+rtl: esyms: rtems_libio_free_user_env -> 0x200881c
+rtl: esyms: rtems_libio_init -> 0x2007afc
+rtl: esyms: rtems_libio_init_helper -> 0x202a624
+rtl: esyms: rtems_libio_iop_freelist -> 0x203683c
+rtl: esyms: rtems_libio_iops -> 0x20365e8
+rtl: esyms: rtems_libio_number_iops -> 0x202a614
+rtl: esyms: rtems_libio_post_driver -> 0x200874c
+rtl: esyms: rtems_libio_post_driver_helper -> 0x202a620
+rtl: esyms: rtems_libio_semaphore -> 0x2036840
+rtl: esyms: rtems_malloc_dirty_helper -> 0x20355b8
+rtl: esyms: rtems_malloc_extend_handler -> 0x202a548
+rtl: esyms: rtems_maximum_priority -> 0x2034e64
+rtl: esyms: rtems_minimum_stack_size -> 0x2034e68
+rtl: esyms: rtems_putc -> 0x2008a2c
+rtl: esyms: rtems_rtl_alloc_del -> 0x200cb20
+rtl: esyms: rtems_rtl_alloc_heap -> 0x200ca08
+rtl: esyms: rtems_rtl_alloc_initialise -> 0x200ca40
+rtl: esyms: rtems_rtl_alloc_module_del -> 0x200cba4
+rtl: esyms: rtems_rtl_alloc_module_new -> 0x200cc00
+rtl: esyms: rtems_rtl_alloc_new -> 0x200ca7c
+rtl: esyms: rtems_rtl_base_sym_global_add -> 0x2013500
+rtl: esyms: rtems_rtl_baseimage -> 0x201357c
+rtl: esyms: rtems_rtl_chain_iterate -> 0x200cd40
+rtl: esyms: rtems_rtl_check_handle -> 0x20131ac
+rtl: esyms: rtems_rtl_elf_file_check -> 0x200dc10
+rtl: esyms: rtems_rtl_elf_file_load -> 0x200dcdc
+rtl: esyms: rtems_rtl_elf_file_sig -> 0x200e428
+rtl: esyms: rtems_rtl_elf_file_unload -> 0x200e410
+rtl: esyms: rtems_rtl_elf_find_symbol -> 0x200d59c
+rtl: esyms: rtems_rtl_elf_rel_resolve_sym -> 0x200e6f0
+rtl: esyms: rtems_rtl_elf_relocate_rel -> 0x200e92c
+rtl: esyms: rtems_rtl_elf_relocate_rela -> 0x200e708
+rtl: esyms: rtems_rtl_elf_section_flags -> 0x200e6e8
+rtl: esyms: rtems_rtl_elf_unwind_deregister -> 0x200e960
+rtl: esyms: rtems_rtl_elf_unwind_dw2_deregister -> 0x2012b68
+rtl: esyms: rtems_rtl_elf_unwind_dw2_parse -> 0x2012ac4
+rtl: esyms: rtems_rtl_elf_unwind_dw2_register -> 0x2012b18
+rtl: esyms: rtems_rtl_elf_unwind_parse -> 0x200e948
+rtl: esyms: rtems_rtl_elf_unwind_register -> 0x200e954
+rtl: esyms: rtems_rtl_find_file -> 0x200e4d8
+rtl: esyms: rtems_rtl_find_obj -> 0x20131fc
+rtl: esyms: rtems_rtl_get_error -> 0x200e47c
+rtl: esyms: rtems_rtl_global_symbols -> 0x2012bb8
+rtl: esyms: rtems_rtl_load_object -> 0x20132f4
+rtl: esyms: rtems_rtl_lock -> 0x2012eb4
+rtl: esyms: rtems_rtl_match_name -> 0x200fa6c
+rtl: esyms: rtems_rtl_obj_add_section -> 0x2010170
+rtl: esyms: rtems_rtl_obj_alloc -> 0x200f7a0
+rtl: esyms: rtems_rtl_obj_cache_close -> 0x200e9d8
+rtl: esyms: rtems_rtl_obj_cache_flush -> 0x200ea28
+rtl: esyms: rtems_rtl_obj_cache_open -> 0x200e96c
+rtl: esyms: rtems_rtl_obj_cache_read -> 0x200ea70
+rtl: esyms: rtems_rtl_obj_cache_read_byval -> 0x200eef0
+rtl: esyms: rtems_rtl_obj_caches -> 0x2012c20
+rtl: esyms: rtems_rtl_obj_caches_flush -> 0x2012c90
+rtl: esyms: rtems_rtl_obj_comp -> 0x2012cd0
+rtl: esyms: rtems_rtl_obj_comp_close -> 0x200efd0
+rtl: esyms: rtems_rtl_obj_comp_open -> 0x200ef58
+rtl: esyms: rtems_rtl_obj_comp_read -> 0x200f02c
+rtl: esyms: rtems_rtl_obj_comp_set -> 0x200f010
+rtl: esyms: rtems_rtl_obj_find_file -> 0x20100dc
+rtl: esyms: rtems_rtl_obj_find_section -> 0x201024c
+rtl: esyms: rtems_rtl_obj_find_section_by_index -> 0x2010278
+rtl: esyms: rtems_rtl_obj_free -> 0x200f7e0
+rtl: esyms: rtems_rtl_obj_load -> 0x2010858
+rtl: esyms: rtems_rtl_obj_load_sections -> 0x2010404
+rtl: esyms: rtems_rtl_obj_load_symbols -> 0x2010390
+rtl: esyms: rtems_rtl_obj_relocate -> 0x20102a4
+rtl: esyms: rtems_rtl_obj_relocate_unresolved -> 0x200da84
+rtl: esyms: rtems_rtl_obj_run_ctors -> 0x2010838
+rtl: esyms: rtems_rtl_obj_run_dtors -> 0x2010848
+rtl: esyms: rtems_rtl_obj_synchronize_cache -> 0x2010318
+rtl: esyms: rtems_rtl_obj_unload -> 0x20109b4
+rtl: esyms: rtems_rtl_parse_name -> 0x200f8ec
+rtl: esyms: rtems_rtl_rap_file_check -> 0x2010bd4
+rtl: esyms: rtems_rtl_rap_file_load -> 0x2010c9c
+rtl: esyms: rtems_rtl_rap_file_sig -> 0x2011b58
+rtl: esyms: rtems_rtl_rap_file_unload -> 0x2011b50
+rtl: esyms: rtems_rtl_set_error -> 0x200e434
+rtl: esyms: rtems_rtl_strdup -> 0x2011b64
+rtl: esyms: rtems_rtl_symbol_global_add -> 0x2011d74
+rtl: esyms: rtems_rtl_symbol_global_find -> 0x2011cb4
+rtl: esyms: rtems_rtl_symbol_obj_add -> 0x2012078
+rtl: esyms: rtems_rtl_symbol_obj_erase -> 0x20120f0
+rtl: esyms: rtems_rtl_symbol_obj_erase_local -> 0x20120c0
+rtl: esyms: rtems_rtl_symbol_obj_find -> 0x2011fe4
+rtl: esyms: rtems_rtl_symbol_table_close -> 0x2011ca0
+rtl: esyms: rtems_rtl_symbol_table_open -> 0x2011c00
+rtl: esyms: rtems_rtl_trace -> 0x2012188
+rtl: esyms: rtems_rtl_trace_set_mask -> 0x20121a0
+rtl: esyms: rtems_rtl_unload_object -> 0x201341c
+rtl: esyms: rtems_rtl_unlock -> 0x2012d00
+rtl: esyms: rtems_rtl_unresolved -> 0x2012bec
+rtl: esyms: rtems_rtl_unresolved_add -> 0x20125e8
+rtl: esyms: rtems_rtl_unresolved_interate -> 0x201241c
+rtl: esyms: rtems_rtl_unresolved_resolve -> 0x20128f8
+rtl: esyms: rtems_rtl_unresolved_table_close -> 0x20123e8
+rtl: esyms: rtems_rtl_unresolved_table_open -> 0x20123bc
+rtl: esyms: rtems_semaphore_create -> 0x2014fe8
+rtl: esyms: rtems_semaphore_delete -> 0x2015204
+rtl: esyms: rtems_semaphore_obtain -> 0x2015378
+rtl: esyms: rtems_semaphore_release -> 0x201562c
+rtl: esyms: rtems_shutdown_executive -> 0x20161e0
+rtl: esyms: rtems_status_code_to_errno -> 0x20157ac
+rtl: esyms: rtems_task_create -> 0x201583c
+rtl: esyms: rtems_task_delete -> 0x2015970
+rtl: esyms: rtems_task_mode -> 0x2015ad0
+rtl: esyms: rtems_task_start -> 0x2015eac
+rtl: esyms: rtems_task_wake_after -> 0x2015fa8
+rtl: esyms: rtems_termios_baud_table -> 0x2032d60
+rtl: esyms: rtems_termios_close -> 0x200a6e0
+rtl: esyms: rtems_termios_enqueue_raw_characters -> 0x200b9fc
+rtl: esyms: rtems_termios_initialize -> 0x200be08
+rtl: esyms: rtems_termios_ioctl -> 0x200a7d8
+rtl: esyms: rtems_termios_linesw -> 0x20362b0
+rtl: esyms: rtems_termios_number_to_baud -> 0x200bdb0
+rtl: esyms: rtems_termios_open -> 0x200a5ec
+rtl: esyms: rtems_termios_puts -> 0x200ac80
+rtl: esyms: rtems_termios_read -> 0x200b5ac
+rtl: esyms: rtems_termios_set_initial_baud -> 0x200bdc8
+rtl: esyms: rtems_termios_ttyMutex -> 0x2036844
+rtl: esyms: rtems_termios_write -> 0x200b4d0
+rtl: esyms: rtems_test_begin_with_plugin -> 0x201c280
+rtl: esyms: rtems_test_end_with_plugin -> 0x201c2a4
+rtl: esyms: rtems_test_fatal_extension -> 0x201c2c8
+rtl: esyms: rtems_test_name -> 0x202a628
+rtl: esyms: rtems_timecounter_simple_install -> 0x20165c4
+rtl: esyms: set_vector -> 0x200506c
+rtl: esyms: setlocale -> 0x201f710
+rtl: esyms: sigemptyset -> 0x20149c8
+rtl: esyms: sparc_syscall_exit -> 0x20054e4
+rtl: esyms: start -> 0x2000000
+rtl: esyms: stat -> 0x2008a48
+rtl: esyms: strchr -> 0x202139c
+rtl: esyms: strcmp -> 0x2021560
+rtl: esyms: strcpy -> 0x202162c
+rtl: esyms: strlen -> 0x20216ac
+rtl: esyms: strncmp -> 0x202176c
+rtl: esyms: strncpy -> 0x2021898
+rtl: esyms: strrchr -> 0x202199c
+rtl: esyms: strtoul -> 0x2021c04
+rtl: esyms: symlink -> 0x2009a68
+rtl: esyms: syscall -> 0x20054e0
+rtl: esyms: syscall_irqdis -> 0x2005500
+rtl: esyms: syscall_irqen -> 0x2005520
+rtl: esyms: text_start -> 0x2000000
+rtl: esyms: time -> 0x2025910
+rtl: esyms: trap_table -> 0x2000000
+rtl: esyms: unlink -> 0x200be58
+rtl: esyms: vfiprintf -> 0x20270f4
+rtl: esyms: vfprintf -> 0x2029a94
+rtl: esyms: vprintk -> 0x200bedc
+rtl: esyms: vsnprintf -> 0x2029c20
+rtl: esyms: wcrtomb -> 0x2029e68
+rtl: esyms: window_flush_trap_handler -> 0x2005420
+rtl: esyms: window_overflow_trap_handler -> 0x2005394
+rtl: esyms: window_underflow_trap_handler -> 0x20053d0
+rtl: esyms: write -> 0x200c41c
+rtl: esyms: rtems_rtl_base_global_syms_init -> 0x2001404
+rtl: loading '/dl-o4.o'
+rtl: alloc: new: OBJECT addr=0x2040d20 size=9
+rtl: alloc: del: OBJECT addr=0x0
+rtl: alloc: new: OBJECT addr=0x20489c0 size=144
+rtl: alloc: new: OBJECT addr=0x2040d38 size=9
+rtl: alloc: new: OBJECT addr=0x2040d50 size=9
+rtl: section header: 0: offset=2928
+rtl: section: 0: type=0 flags=00000000 link=0 info=0
+rtl: section header: 1: offset=2968
+rtl: section: 1: type=1 flags=00000006 link=0 info=0
+rtl: section header: 2: offset=3008
+rtl: section: 2: type=1 flags=00000003 link=0 info=0
+rtl: section header: 3: offset=3048
+rtl: section: 3: type=8 flags=00000003 link=0 info=0
+rtl: section header: 4: offset=3088
+rtl: section: 4: type=1 flags=00000006 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x2048a58 size=56
+rtl: alloc: new: OBJECT addr=0x2040d68 size=14
+rtl: sect: 4 : .text._Z3bazv (8)
+rtl: section header: 5: offset=3128
+rtl: section: 5: type=1 flags=00000006 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x2048a98 size=56
+rtl: alloc: new: OBJECT addr=0x2048ad8 size=11
+rtl: sect: 5 : .text.func (8)
+rtl: section header: 6: offset=3168
+rtl: section: 6: type=1 flags=00000000 link=0 info=0
+rtl: section header: 7: offset=3208
+rtl: section: 7: type=4 flags=00000040 link=20 info=6
+rtl: alloc: new: OBJECT addr=0x2048af0 size=56
+rtl: alloc: new: OBJECT addr=0x2048b30 size=17
+rtl: sect: 7 : .rela.debug_info (324)
+rtl: section header: 8: offset=3248
+rtl: section: 8: type=1 flags=00000000 link=0 info=0
+rtl: section header: 9: offset=3288
+rtl: section: 9: type=1 flags=00000000 link=0 info=0
+rtl: section header: 10: offset=3328
+rtl: section: 10: type=4 flags=00000040 link=20 info=9
+rtl: alloc: new: OBJECT addr=0x2048b50 size=56
+rtl: alloc: new: OBJECT addr=0x2048b90 size=20
+rtl: sect: 10: .rela.debug_aranges (36)
+rtl: section header: 11: offset=3368
+rtl: section: 11: type=1 flags=00000000 link=0 info=0
+rtl: section header: 12: offset=3408
+rtl: section: 12: type=4 flags=00000040 link=20 info=11
+rtl: alloc: new: OBJECT addr=0x2048bb0 size=56
+rtl: alloc: new: OBJECT addr=0x2048bf0 size=19
+rtl: sect: 12: .rela.debug_ranges (48)
+rtl: section header: 13: offset=3448
+rtl: section: 13: type=1 flags=00000000 link=0 info=0
+rtl: section header: 14: offset=3488
+rtl: section: 14: type=4 flags=00000040 link=20 info=13
+rtl: alloc: new: OBJECT addr=0x2048c10 size=56
+rtl: alloc: new: OBJECT addr=0x2048c50 size=17
+rtl: sect: 14: .rela.debug_line (24)
+rtl: section header: 15: offset=3528
+rtl: section: 15: type=1 flags=00000030 link=0 info=0
+rtl: section header: 16: offset=3568
+rtl: section: 16: type=1 flags=00000030 link=0 info=0
+rtl: section header: 17: offset=3608
+rtl: section: 17: type=1 flags=00000002 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x2048c70 size=56
+rtl: alloc: new: OBJECT addr=0x2048cb0 size=10
+rtl: sect: 17: .eh_frame (60)
+rtl: section header: 18: offset=3648
+rtl: section: 18: type=4 flags=00000040 link=20 info=17
+rtl: alloc: new: OBJECT addr=0x2048cc8 size=56
+rtl: alloc: new: OBJECT addr=0x2048d08 size=15
+rtl: sect: 18: .rela.eh_frame (24)
+rtl: section header: 19: offset=3688
+rtl: section: 19: type=3 flags=00000000 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x2048d20 size=56
+rtl: alloc: new: OBJECT addr=0x2048d60 size=10
+rtl: sect: 19: .shstrtab (191)
+rtl: section header: 20: offset=3728
+rtl: section: 20: type=2 flags=00000000 link=21 info=15
+rtl: alloc: new: OBJECT addr=0x2048d78 size=56
+rtl: alloc: new: OBJECT addr=0x2048db8 size=8
+rtl: sect: 20: .symtab (272)
+rtl: section header: 21: offset=3768
+rtl: section: 21: type=3 flags=00000000 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x2048dc8 size=56
+rtl: alloc: new: OBJECT addr=0x2048e08 size=8
+rtl: sect: 21: .strtab (24)
+rtl: alloc: new: READ_EXEC addr=0x2048e18 size=16
+rtl: alloc: new: READ addr=0x2048e30 size=4
+rtl: alloc: new: READ addr=0x2048e40 size=60
+rtl: load sect: text - b:0x2048e18 s:16 a:4
+rtl: load sect: const - b:0x2048e30 s:4 a:0
+rtl: load sect: eh - b:0x2048e40 s:60 a:4
+rtl: load sect: data - b:0x0 s:0 a:0
+rtl: load sect: bss - b:0x0 s:0 a:0
+rtl: loading: 0: .text._Z3bazv -> 0x2048e18 (s:8 f:0401 a:4 l:00)
+rtl: loading: 1: .text.func -> 0x2048e20 (s:8 f:0401 a:4 l:00)
+rtl: loading: 0: .eh_frame -> 0x2048e40 (s:60 f:0410 a:4 l:00)
+rtl: alloc: new: SYMBOL addr=0x2048e88 size=53
+rtl: sym:add:15 name:11:_Z3bazv bind:1 type:2 val:0x2048e18 sect:4 size:8
+rtl: sym:add:16 name:19:func bind:1 type:2 val:0x2048e20 sect:5 size:8
+rtl: relocation: .rela.eh_frame, syms:.symtab
+rtl: rela: sym:(null)(5)=02048e18 type:6 off:0000001c addend:0
+rtl: DISP_32 0xffffffbc @ 0x2048e5c in /dl-o4.o
+rtl: rela: sym:(null)(6)=02048e20 type:6 off:00000030 addend:0
+rtl: DISP_32 0xffffffb0 @ 0x2048e70 in /dl-o4.o
+rtl: alloc: new: OBJECT addr=0x2048ec8 size=84
+rtl: linkmap_add
+rtl: unresolv: global resolve
+dlopen:
+rtl: unloading '/dl-o4.o'
+rtl: alloc: del: READ_WRITE addr=0x0
+rtl: alloc: del: READ_WRITE addr=0x0
+rtl: alloc: del: READ addr=0x2048e40
+rtl: alloc: del: READ addr=0x2048e30
+rtl: alloc: del: READ_EXEC addr=0x2048e18
+rtl: alloc: del: SYMBOL addr=0x2048e88
+rtl: alloc: del: OBJECT addr=0x2040d38
+rtl: alloc: del: OBJECT addr=0x2040d50
+rtl: alloc: del: OBJECT addr=0x2048ec8
+rtl: alloc: del: OBJECT addr=0x20489c0
+*** END OF TEST libdl (RTL) 4 ***
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
new file mode 100644
index 0000000000..6e488649a9
--- /dev/null
+++ b/testsuites/libtests/dl04/init.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <errno.h>
+#include <string.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <rtems/rtl/rtl.h>
+#include <rtems/untar.h>
+
+#include "dl-load.h"
+
+const char rtems_test_name[] = "libdl (RTL) 4";
+
+/* forward declarations to avoid warnings */
+static rtems_task Init(rtems_task_argument argument);
+
+#include "dl-tar.h"
+
+#define TARFILE_START dl_tar
+#define TARFILE_SIZE dl_tar_size
+
+static int test(void)
+{
+ int ret;
+ ret = dl_load_test();
+ if (ret)
+ rtems_test_exit(ret);
+ return 0;
+}
+
+static void Init(rtems_task_argument arg)
+{
+ int te;
+
+ TEST_BEGIN();
+
+ te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+ if (te != 0)
+ {
+ printf("untar failed: %d\n", te);
+ rtems_test_exit(1);
+ exit (1);
+ }
+
+ test();
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (8U * 1024U)
+
+#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/dl05/Makefile.am b/testsuites/libtests/dl05/Makefile.am
new file mode 100644
index 0000000000..d63f355c76
--- /dev/null
+++ b/testsuites/libtests/dl05/Makefile.am
@@ -0,0 +1,50 @@
+rtems_tests_PROGRAMS = dl05
+dl05_SOURCES = init.c dl-load.c dl-cpp.cpp dl-tar.c dl-tar.h
+
+BUILT_SOURCES = dl-tar.c dl-tar.h
+
+dist_rtems_tests_DATA = dl05.scn dl05.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(dl05_OBJECTS)
+LINK_LIBS = $(dl05_LDLIBS)
+
+dl-o5.o: dl-o5.cpp
+
+dl.tar: dl-o5.o
+ @rm -f $@
+ $(PAX) -w -f $@ $<
+CLEANFILES += dl.tar
+
+dl-tar.c: dl.tar
+ $(BIN2C) -C $< $@
+CLEANFILES += dl-tar.c
+
+dl-tar.h: dl.tar
+ $(BIN2C) -H $< $@
+CLEANFILES += dl-tar.h
+
+dl05.pre$(EXEEXT): $(dl05_OBJECTS) $(dl05_DEPENDENCIES)
+ @rm -f dl05.pre$(EXEEXT)
+ $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
+ rm -f dl05.pre.ralf
+
+dl05.pre: dl05.pre$(EXEEXT)
+ mv $< $@
+CLEANFILES += dl05.pre
+
+dl-sym.o: dl05.pre
+ rtems-syms -e -c "$(CFLAGS)" -o $@ $<
+
+dl05$(EXEEXT): $(dl05_OBJECTS) $(dl05_DEPENDENCIES) dl-sym.o
+ @rm -f dl05$(EXEEXT)
+ $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $(basename $@)$(EXEEXT) $(LINK_OBJS) dl-sym.o $(LINK_LIBS)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/dl05/dl-cpp.cpp b/testsuites/libtests/dl05/dl-cpp.cpp
new file mode 100644
index 0000000000..0e2005713e
--- /dev/null
+++ b/testsuites/libtests/dl05/dl-cpp.cpp
@@ -0,0 +1,30 @@
+/*
+ * The base image needs this to include the RTTI data.
+ */
+#include <cstdio>
+#include <stdexcept>
+#include "dl-load.h"
+void exception_base(bool throw_runtime)
+{
+ printf("%s: begin\n", __func__);
+ try
+ {
+ if (throw_runtime)
+ throw std::runtime_error("eb: throw std::runtime_error");
+ else
+ throw dl_test_throw_me("eb: throw me");
+ }
+ catch (std::exception const& e)
+ {
+ printf("%s: caught: %s\n", __func__, e.what());
+ }
+ catch (dl_test_throw_me const& e)
+ {
+ printf("%s: caught: %s\n", __func__, e.what());
+ }
+ catch (...)
+ {
+ printf("%s: caught: unknown\n", __func__);
+ }
+ printf("%s: end\n", __func__);
+}
diff --git a/testsuites/libtests/dl05/dl-load.c b/testsuites/libtests/dl05/dl-load.c
new file mode 100644
index 0000000000..c7d5698995
--- /dev/null
+++ b/testsuites/libtests/dl05/dl-load.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <stdio.h>
+
+#include <dlfcn.h>
+
+#include <rtems/rtl/rtl-trace.h>
+
+#include "dl-load.h"
+
+int dl_load_test(void)
+{
+ void* handle;
+ const char* err;
+ void (*func)(bool );
+#if __i386__
+ /*
+ * std::runtime_error destructor locks up in atomics.
+ */
+ bool throw_runtime = false;
+#else
+ bool throw_runtime = true;
+#endif
+
+ rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL);
+
+ handle = dlopen("/dl-o5.o", RTLD_GLOBAL | RTLD_NOW);
+ if (handle == NULL)
+ {
+ err = dlerror();
+ if (err != NULL)
+ printf("dlopen: %s\n", err);
+ }
+ rtems_test_assert(handle != NULL);
+
+ func = dlsym(handle, "exception_dl");
+ if (func == NULL) {
+ err = dlerror ();
+ if (err)
+ printf ("dlsym: %s\n", err);
+ }
+ rtems_test_assert(func != NULL);
+
+ exception_base(throw_runtime);
+
+ func(throw_runtime);
+
+ rtems_test_assert(dlclose(handle) == 0);
+
+ return 0;
+}
diff --git a/testsuites/libtests/dl05/dl-load.h b/testsuites/libtests/dl05/dl-load.h
new file mode 100644
index 0000000000..7a9e1382fd
--- /dev/null
+++ b/testsuites/libtests/dl05/dl-load.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if !defined(_DL_LOAD_H_)
+#define _DL_LOAD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void exception_base(bool throw_runtime);
+void exception_dl(bool throw_runtime);
+
+int dl_load_test(void);
+
+#ifdef __cplusplus
+ class dl_test_throw_me
+ {
+ public:
+ dl_test_throw_me(const char* message) :
+ message (message) {
+ }
+ dl_test_throw_me(const dl_test_throw_me& orig) :
+ message (orig.message) {
+ }
+ dl_test_throw_me() :
+ message (0) {
+ }
+
+ ~dl_test_throw_me() {
+ }
+
+ const char* what() const {
+ return message;
+ }
+
+ private:
+ const char* message;
+ };
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/testsuites/libtests/dl05/dl-o5.cpp b/testsuites/libtests/dl05/dl-o5.cpp
new file mode 100644
index 0000000000..5918e8f2d5
--- /dev/null
+++ b/testsuites/libtests/dl05/dl-o5.cpp
@@ -0,0 +1,28 @@
+#include <cstdio>
+#include <stdexcept>
+#include "dl-load.h" /* make the symbol a C linkage */
+void exception_dl(bool throw_runtime)
+{
+ printf("exception_dl: begin\n");
+ try
+ {
+ printf("exception_dl: throwing...\n");
+ if (throw_runtime)
+ throw std::runtime_error("throw std::runtime_error object");
+ else
+ throw dl_test_throw_me("throw dl_test_throw_me object");
+ }
+ catch (dl_test_throw_me const& e)
+ {
+ printf("%s: caught: %s\n", __func__, e.what());
+ }
+ catch (std::exception const& e)
+ {
+ printf("%s: caught: %s\n", __func__, e.what());
+ }
+ catch (...)
+ {
+ printf("%s: caught: unknown\n", __func__);
+ }
+ printf("exception_dl: end\n");
+}
diff --git a/testsuites/libtests/dl05/dl05.doc b/testsuites/libtests/dl05/dl05.doc
new file mode 100644
index 0000000000..58d4d95fa1
--- /dev/null
+++ b/testsuites/libtests/dl05/dl05.doc
@@ -0,0 +1,24 @@
+# Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.org/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: dl04
+
+directives:
+
+ dlopen
+ dlerror
+ dlclose
+
+concepts:
+
++ Load a single ELF object file containing C++ code with an exception.
++ Throw the exception.
++ Unload the ELF file.
+
+Note: the test fails because terminate is raised.
diff --git a/testsuites/libtests/dl05/dl05.scn b/testsuites/libtests/dl05/dl05.scn
new file mode 100644
index 0000000000..c14b6c496d
--- /dev/null
+++ b/testsuites/libtests/dl05/dl05.scn
@@ -0,0 +1,1424 @@
+
+
+*** BEGIN OF TEST libdl (RTL) 5 ***
+rtl: alloc: new: SYMBOL addr=0x209b4d8 size=384
+rtl: alloc: new: OBJECT addr=0x209ba68 size=2048
+rtl: alloc: new: OBJECT addr=0x209c270 size=2048
+rtl: alloc: new: OBJECT addr=0x209ca78 size=2048
+rtl: alloc: new: OBJECT addr=0x209d280 size=2048
+rtl: alloc: new: OBJECT addr=0x209da88 size=144
+rtl: alloc: new: OBJECT addr=0x208fa18 size=13
+rtl: alloc: new: OBJECT addr=0x208fa30 size=2
+rtl: adding global symbols, table size 29200
+rtl: global symbol add: 1082
+rtl: alloc: new: SYMBOL addr=0x209db20 size=21640
+rtl: esyms: .div -> 0x20115d4
+rtl: esyms: .rem -> 0x2011884
+rtl: esyms: .udiv -> 0x20115cc
+rtl: esyms: .umul -> 0x20114e4
+rtl: esyms: .urem -> 0x201187c
+rtl: esyms: BSP_output_char -> 0x205f74c
+rtl: esyms: BSP_shared_interrupt_init -> 0x201804c
+rtl: esyms: CLOCK_SPEED -> 0x20007e0
+rtl: esyms: Clock_driver_ticks -> 0x20652ec
+rtl: esyms: Clock_exit -> 0x20176f0
+rtl: esyms: Clock_initialize -> 0x20177e0
+rtl: esyms: Clock_isr -> 0x2017740
+rtl: esyms: Configuration -> 0x2046e9c
+rtl: esyms: Configuration_POSIX_API -> 0x205ffc4
+rtl: esyms: Configuration_RTEMS_API -> 0x205f6b4
+rtl: esyms: Console_Configuration_Count -> 0x205f750
+rtl: esyms: Console_Configuration_Ports -> 0x205f754
+rtl: esyms: Console_Port_Count -> 0x2064e48
+rtl: esyms: Console_Port_Data -> 0x2064e40
+rtl: esyms: Console_Port_Minor -> 0x2064e3c
+rtl: esyms: Console_Port_Tbl -> 0x2064e44
+rtl: esyms: ERC32_MEC -> 0x1f80000
+rtl: esyms: IMFS_LIMITS_AND_OPTIONS -> 0x205c9c0
+rtl: esyms: IMFS_chown -> 0x2018d90
+rtl: esyms: IMFS_create_node -> 0x2018df8
+rtl: esyms: IMFS_eval_path -> 0x20192d4
+rtl: esyms: IMFS_fchmod -> 0x20192ec
+rtl: esyms: IMFS_initialize_node -> 0x2019394
+rtl: esyms: IMFS_initialize_support -> 0x2019418
+rtl: esyms: IMFS_link -> 0x201962c
+rtl: esyms: IMFS_memfile_write -> 0x2019f8c
+rtl: esyms: IMFS_mknod -> 0x201a1d0
+rtl: esyms: IMFS_mknod_control_device -> 0x205ca48
+rtl: esyms: IMFS_mknod_control_dir_default -> 0x205c9f0
+rtl: esyms: IMFS_mknod_control_enosys -> 0x205ca98
+rtl: esyms: IMFS_mknod_control_memfile -> 0x205caf8
+rtl: esyms: IMFS_mount -> 0x201a280
+rtl: esyms: IMFS_node_clone -> 0x20194cc
+rtl: esyms: IMFS_node_destroy -> 0x20194e4
+rtl: esyms: IMFS_node_destroy_default -> 0x2019368
+rtl: esyms: IMFS_node_free -> 0x2019500
+rtl: esyms: IMFS_node_initialize_default -> 0x2019540
+rtl: esyms: IMFS_node_initialize_directory -> 0x2018e94
+rtl: esyms: IMFS_node_remove_default -> 0x2019344
+rtl: esyms: IMFS_node_remove_directory -> 0x2018eac
+rtl: esyms: IMFS_readlink -> 0x201a590
+rtl: esyms: IMFS_rename -> 0x201a2f4
+rtl: esyms: IMFS_rmnod -> 0x201a3f4
+rtl: esyms: IMFS_stat -> 0x201a468
+rtl: esyms: IMFS_stat_file -> 0x201a4c8
+rtl: esyms: IMFS_symlink -> 0x201a52c
+rtl: esyms: IMFS_unmount -> 0x201a5f8
+rtl: esyms: IMFS_utime -> 0x201a66c
+rtl: esyms: Initialization_tasks -> 0x205f714
+rtl: esyms: PROM_END -> 0x200000
+rtl: esyms: PROM_SIZE -> 0x200000
+rtl: esyms: PROM_START -> 0x0
+rtl: esyms: RAM_END -> 0x2400000
+rtl: esyms: RAM_SIZE -> 0x400000
+rtl: esyms: RAM_START -> 0x2000000
+rtl: esyms: RTEMS_Malloc_Area -> 0x2065280
+rtl: esyms: RTEMS_Malloc_GC_list -> 0x205f888
+rtl: esyms: RTEMS_Malloc_Heap -> 0x205f730
+rtl: esyms: RTEMS_Malloc_Initialize -> 0x201b290
+rtl: esyms: TOD_TICKS_PER_SECOND_method -> 0x202a83c
+rtl: esyms: Untar_FromMemory -> 0x202fc44
+rtl: esyms: _API_Mutex_Allocate -> 0x2029ff4
+rtl: esyms: _API_Mutex_Initialization -> 0x2029fc4
+rtl: esyms: _API_Mutex_Lock -> 0x202a058
+rtl: esyms: _API_Mutex_Unlock -> 0x202a238
+rtl: esyms: _API_extensions_Add -> 0x2029f68
+rtl: esyms: _API_extensions_Initialization -> 0x2029f4c
+rtl: esyms: _API_extensions_List -> 0x2065b00
+rtl: esyms: _API_extensions_Run_postdriver -> 0x2029f80
+rtl: esyms: _Balloc -> 0x2033880
+rtl: esyms: _Barrier_Information -> 0x2065730
+rtl: esyms: _Barrier_Manager_initialization -> 0x20282f0
+rtl: esyms: _Bfree -> 0x2033910
+rtl: esyms: _CORE_mutex_Flush -> 0x202a4f8
+rtl: esyms: _CORE_mutex_Initialize -> 0x202a368
+rtl: esyms: _CORE_mutex_Seize_interrupt_blocking -> 0x202a504
+rtl: esyms: _CORE_mutex_Surrender -> 0x202a5bc
+rtl: esyms: _CORE_semaphore_Initialize -> 0x202a778
+rtl: esyms: _CPU_Context_Initialize -> 0x202fa60
+rtl: esyms: _CPU_Context_restore -> 0x2018190
+rtl: esyms: _CPU_Context_restore_fp -> 0x202fba0
+rtl: esyms: _CPU_Context_restore_heir -> 0x20180d0
+rtl: esyms: _CPU_Context_save_fp -> 0x202fb54
+rtl: esyms: _CPU_Context_switch -> 0x2018094
+rtl: esyms: _CPU_Exception_frame_print -> 0x2018560
+rtl: esyms: _CPU_Fatal_halt -> 0x2017598
+rtl: esyms: _CPU_ISR_Get_level -> 0x202f940
+rtl: esyms: _CPU_ISR_install_raw_handler -> 0x202f954
+rtl: esyms: _CPU_ISR_install_vector -> 0x202fa24
+rtl: esyms: _CPU_Initialize -> 0x202f900
+rtl: esyms: _CPU_Null_fp_context -> 0x2065a60
+rtl: esyms: _CPU_Trap_slot_template -> 0x205c600
+rtl: esyms: _Chain_Append -> 0x202a2e0
+rtl: esyms: _Chain_Extract -> 0x202a30c
+rtl: esyms: _Chain_Get -> 0x202a330
+rtl: esyms: _Chain_Initialize -> 0x202a284
+rtl: esyms: _Debug_Level -> 0x20659fc
+rtl: esyms: _Debug_Manager_initialization -> 0x20299e8
+rtl: esyms: _Dual_ported_memory_Information -> 0x206576c
+rtl: esyms: _Dual_ported_memory_Manager_initialization -> 0x2028348
+rtl: esyms: _ERC32_MEC -> 0x1f80000
+rtl: esyms: _ERC32_MEC_Timer_Control_Mirror -> 0x20007c0
+rtl: esyms: _Event_Manager_initialization -> 0x2028380
+rtl: esyms: _Event_Seize -> 0x2028408
+rtl: esyms: _Event_Surrender -> 0x2028610
+rtl: esyms: _Extension_Information -> 0x2065b0c
+rtl: esyms: _Extension_Manager_initialization -> 0x2029aec
+rtl: esyms: _Freechain_Get -> 0x202a8a0
+rtl: esyms: _Freechain_Initialize -> 0x202a85c
+rtl: esyms: _Freechain_Put -> 0x202a920
+rtl: esyms: _Heap_Allocate_aligned_with_boundary -> 0x202ad68
+rtl: esyms: _Heap_Block_allocate -> 0x202ac30
+rtl: esyms: _Heap_Free -> 0x202af9c
+rtl: esyms: _Heap_Get_first_and_last_block -> 0x202aa74
+rtl: esyms: _Heap_Initialize -> 0x202ab0c
+rtl: esyms: _Heap_Resize_block -> 0x202b18c
+rtl: esyms: _Heap_Size_of_alloc_area -> 0x202b2a4
+rtl: esyms: _IO_All_drivers_initialized -> 0x2065b48
+rtl: esyms: _IO_Driver_address_table -> 0x205f6e4
+rtl: esyms: _IO_Initialize_all_drivers -> 0x2029b60
+rtl: esyms: _IO_Number_of_drivers -> 0x2046f74
+rtl: esyms: _ISR_Handler -> 0x20181a0
+rtl: esyms: _ISR_Handler_initialization -> 0x202b37c
+rtl: esyms: _ISR_Vector_table -> 0x2065e74
+rtl: esyms: _Internal_Objects -> 0x2065978
+rtl: esyms: _Internal_errors_What_happened -> 0x2065e64
+rtl: esyms: _Message_queue_Information -> 0x20657a8
+rtl: esyms: _Message_queue_Manager_initialization -> 0x2028784
+rtl: esyms: _Objects_API_maximum_class -> 0x202bdec
+rtl: esyms: _Objects_Allocate -> 0x202bdd4
+rtl: esyms: _Objects_Allocate_unprotected -> 0x202bd08
+rtl: esyms: _Objects_Close -> 0x202be14
+rtl: esyms: _Objects_Extend_information -> 0x202be30
+rtl: esyms: _Objects_Free -> 0x202c19c
+rtl: esyms: _Objects_Get -> 0x202c240
+rtl: esyms: _Objects_Get_information -> 0x202c2f0
+rtl: esyms: _Objects_Get_information_id -> 0x202c364
+rtl: esyms: _Objects_Get_isr_disable -> 0x202c37c
+rtl: esyms: _Objects_Information_table -> 0x2065968
+rtl: esyms: _Objects_Initialize_information -> 0x202c3e4
+rtl: esyms: _Objects_Namespace_remove -> 0x202c4bc
+rtl: esyms: _Objects_Shrink_information -> 0x202c4e4
+rtl: esyms: _Once -> 0x202c5e0
+rtl: esyms: _Once_Mutex -> 0x20659f4
+rtl: esyms: _POSIX_API_Initialize -> 0x2029de8
+rtl: esyms: _POSIX_Barrier_Information -> 0x2065cf0
+rtl: esyms: _POSIX_Barrier_Manager_initialization -> 0x2027684
+rtl: esyms: _POSIX_Condition_variables_Information -> 0x2065d80
+rtl: esyms: _POSIX_Condition_variables_Manager_initialization -> 0x2026bbc
+rtl: esyms: _POSIX_Key_Manager_initialization -> 0x2026c80
+rtl: esyms: _POSIX_Keys_Free_memory -> 0x2026dfc
+rtl: esyms: _POSIX_Keys_Information -> 0x2065d44
+rtl: esyms: _POSIX_Keys_Key_value_compare -> 0x2026bf4
+rtl: esyms: _POSIX_Keys_Key_value_lookup_tree -> 0x2064fb4
+rtl: esyms: _POSIX_Keys_Key_value_pair_allocate -> 0x2026c40
+rtl: esyms: _POSIX_Keys_Keypool -> 0x2065dbc
+rtl: esyms: _POSIX_Keys_Run_destructors -> 0x2026fb0
+rtl: esyms: _POSIX_Message_queue_Information -> 0x2065c78
+rtl: esyms: _POSIX_Message_queue_Information_fds -> 0x2065dfc
+rtl: esyms: _POSIX_Message_queue_Manager_initialization -> 0x20275b8
+rtl: esyms: _POSIX_Mutex_Default_attributes -> 0x2065d2c
+rtl: esyms: _POSIX_Mutex_Information -> 0x2065cb4
+rtl: esyms: _POSIX_Mutex_Manager_initialization -> 0x2027618
+rtl: esyms: _POSIX_Objects -> 0x2065dc8
+rtl: esyms: _POSIX_RWLock_Information -> 0x2065b4c
+rtl: esyms: _POSIX_RWLock_Manager_initialization -> 0x20276bc
+rtl: esyms: _POSIX_Semaphore_Information -> 0x2065c00
+rtl: esyms: _POSIX_Semaphore_Manager_initialization -> 0x2028284
+rtl: esyms: _POSIX_Spinlock_Information -> 0x2065bc4
+rtl: esyms: _POSIX_Spinlock_Manager_initialization -> 0x2027cf4
+rtl: esyms: _POSIX_Thread_Exit -> 0x2028010
+rtl: esyms: _POSIX_Threads_API_extensions -> 0x205f918
+rtl: esyms: _POSIX_Threads_Default_attributes -> 0x205f924
+rtl: esyms: _POSIX_Threads_Information -> 0x2065b88
+rtl: esyms: _POSIX_Threads_Initialize_user_threads_p -> 0x205ffc0
+rtl: esyms: _POSIX_Threads_Manager_initialization -> 0x2027fc0
+rtl: esyms: _POSIX_Threads_Sporadic_budget_TSR -> 0x2027d84
+rtl: esyms: _POSIX_Threads_User_extensions -> 0x205f8e0
+rtl: esyms: _POSIX_Threads_cancel_run -> 0x2026b20
+rtl: esyms: _POSIX_Timer_Information -> 0x2065c3c
+rtl: esyms: _POSIX_Timer_Manager_initialization -> 0x202824c
+rtl: esyms: _POSIX_signals_Abnormal_termination_handler -> 0x20276f4
+rtl: esyms: _POSIX_signals_Action_handler -> 0x2027704
+rtl: esyms: _POSIX_signals_Check_signal -> 0x20278a8
+rtl: esyms: _POSIX_signals_Clear_process_signals -> 0x202797c
+rtl: esyms: _POSIX_signals_Clear_signals -> 0x20279e4
+rtl: esyms: _POSIX_signals_Default_vectors -> 0x205e59c
+rtl: esyms: _POSIX_signals_Inactive_siginfo -> 0x206558c
+rtl: esyms: _POSIX_signals_Manager_Initialization -> 0x20277f0
+rtl: esyms: _POSIX_signals_Pending -> 0x20655ac
+rtl: esyms: _POSIX_signals_Set_process_signals -> 0x2027b3c
+rtl: esyms: _POSIX_signals_Siginfo -> 0x20655b0
+rtl: esyms: _POSIX_signals_Unblock_thread -> 0x2027b60
+rtl: esyms: _POSIX_signals_Vectors -> 0x206540c
+rtl: esyms: _POSIX_signals_Wait_queue -> 0x2065598
+rtl: esyms: _PROM_END -> 0x200000
+rtl: esyms: _PROM_SIZE -> 0x200000
+rtl: esyms: _PROM_START -> 0x0
+rtl: esyms: _Partition_Information -> 0x20657e4
+rtl: esyms: _Partition_Manager_initialization -> 0x20287bc
+rtl: esyms: _Per_CPU_Information -> 0x20662a0
+rtl: esyms: _Protected_heap_Allocate_aligned_with_boundary -> 0x202c644
+rtl: esyms: _Protected_heap_Free -> 0x202c67c
+rtl: esyms: _Protected_heap_Get_block_size -> 0x202c6ac
+rtl: esyms: _Protected_heap_Resize_block -> 0x202c6e0
+rtl: esyms: _RAM_END -> 0x2400000
+rtl: esyms: _RAM_SIZE -> 0x400000
+rtl: esyms: _RAM_START -> 0x2000000
+rtl: esyms: _RBTree_Extract -> 0x202c9f4
+rtl: esyms: _RBTree_Find -> 0x202cba0
+rtl: esyms: _RBTree_Insert -> 0x202cc00
+rtl: esyms: _RBTree_Next -> 0x202ce80
+rtl: esyms: _RTEMS_API_Initialize -> 0x2029e50
+rtl: esyms: _RTEMS_Allocator_Mutex -> 0x20659f8
+rtl: esyms: _RTEMS_Objects -> 0x2065e38
+rtl: esyms: _RTEMS_Tasks_Invoke_task_variable_dtor -> 0x2029854
+rtl: esyms: _RTEMS_tasks_API_extensions -> 0x205f9a8
+rtl: esyms: _RTEMS_tasks_Information -> 0x2065914
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks -> 0x20296f4
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks_body -> 0x2029310
+rtl: esyms: _RTEMS_tasks_Initialize_user_tasks_p -> 0x205f6a8
+rtl: esyms: _RTEMS_tasks_Manager_initialization -> 0x2029750
+rtl: esyms: _RTEMS_tasks_User_extensions -> 0x205f970
+rtl: esyms: _RTEMS_version -> 0x205c670
+rtl: esyms: _Rate_monotonic_Information -> 0x2065820
+rtl: esyms: _Rate_monotonic_Manager_initialization -> 0x20287f4
+rtl: esyms: _Region_Information -> 0x206585c
+rtl: esyms: _Region_Manager_initialization -> 0x202882c
+rtl: esyms: _SPARC_Counter -> 0x205fa7c
+rtl: esyms: _SPARC_Counter_difference_default -> 0x202fbec
+rtl: esyms: _Scheduler_Handler_initialization -> 0x202cf18
+rtl: esyms: _Scheduler_Table -> 0x2046f7c
+rtl: esyms: _Scheduler_default_Node_destroy -> 0x202cf38
+rtl: esyms: _Scheduler_default_Node_initialize -> 0x202cf40
+rtl: esyms: _Scheduler_default_Release_job -> 0x202cf48
+rtl: esyms: _Scheduler_default_Start_idle -> 0x202cf50
+rtl: esyms: _Scheduler_default_Tick -> 0x202cf70
+rtl: esyms: _Scheduler_priority_Block -> 0x202d064
+rtl: esyms: _Scheduler_priority_Change_priority -> 0x202d1d4
+rtl: esyms: _Scheduler_priority_Initialize -> 0x202d014
+rtl: esyms: _Scheduler_priority_Priority_compare -> 0x202d3e4
+rtl: esyms: _Scheduler_priority_Schedule -> 0x202d3ec
+rtl: esyms: _Scheduler_priority_Unblock -> 0x202d4d4
+rtl: esyms: _Scheduler_priority_Update_priority -> 0x202d570
+rtl: esyms: _Scheduler_priority_Yield -> 0x202d5d4
+rtl: esyms: _Semaphore_Information -> 0x20658d8
+rtl: esyms: _Semaphore_Manager_initialization -> 0x20288a4
+rtl: esyms: _Semaphore_Translate_core_mutex_return_code_ -> 0x205e730
+rtl: esyms: _Semaphore_Translate_core_semaphore_return_code_ -> 0x205e71c
+rtl: esyms: _Signal_Action_handler -> 0x202900c
+rtl: esyms: _Signal_Manager_initialization -> 0x2029004
+rtl: esyms: _System_state_Current -> 0x2065e70
+rtl: esyms: _TLS_Alignment -> 0x1
+rtl: esyms: _TLS_BSS_begin -> 0x205f6a0
+rtl: esyms: _TLS_BSS_end -> 0x205f6a0
+rtl: esyms: _TLS_BSS_size -> 0x0
+rtl: esyms: _TLS_Data_begin -> 0x205f6a0
+rtl: esyms: _TLS_Data_size -> 0x0
+rtl: esyms: _TLS_Size -> 0x0
+rtl: esyms: _TOD -> 0x2065960
+rtl: esyms: _TOD_Handler_initialization -> 0x202a7a8
+rtl: esyms: _TOD_Tickle_ticks -> 0x202a7dc
+rtl: esyms: _Terminate -> 0x202b328
+rtl: esyms: _Thread_Allocated_fp -> 0x20659f0
+rtl: esyms: _Thread_Change_priority -> 0x202d7a4
+rtl: esyms: _Thread_Clear_state -> 0x202d8c4
+rtl: esyms: _Thread_Close -> 0x202eb30
+rtl: esyms: _Thread_Control_add_on_count -> 0x2046ee0
+rtl: esyms: _Thread_Control_add_ons -> 0x2046ee4
+rtl: esyms: _Thread_Control_size -> 0x2046f04
+rtl: esyms: _Thread_Create_idle -> 0x202d928
+rtl: esyms: _Thread_Dispatch -> 0x202dbc4
+rtl: esyms: _Thread_Do_dispatch -> 0x202d9d4
+rtl: esyms: _Thread_Get -> 0x202dc54
+rtl: esyms: _Thread_Get_interrupt_disable -> 0x202dcac
+rtl: esyms: _Thread_Global_construction -> 0x202dd04
+rtl: esyms: _Thread_Handler -> 0x202dde4
+rtl: esyms: _Thread_Handler_initialization -> 0x202d6ec
+rtl: esyms: _Thread_Initialize -> 0x202debc
+rtl: esyms: _Thread_Internal_information -> 0x2065a1c
+rtl: esyms: _Thread_Kill_zombies -> 0x202e8e8
+rtl: esyms: _Thread_Life_action_handler -> 0x202e9c4
+rtl: esyms: _Thread_Load_environment -> 0x202e194
+rtl: esyms: _Thread_Raise_priority -> 0x202d888
+rtl: esyms: _Thread_Restart -> 0x202eb88
+rtl: esyms: _Thread_Restore_priority -> 0x202d8a4
+rtl: esyms: _Thread_Set_life_protection -> 0x202ebc4
+rtl: esyms: _Thread_Set_priority -> 0x202ecf0
+rtl: esyms: _Thread_Set_state -> 0x202ed08
+rtl: esyms: _Thread_Stack_Allocate -> 0x202ed50
+rtl: esyms: _Thread_Stack_Free -> 0x202ed90
+rtl: esyms: _Thread_Start -> 0x202edb8
+rtl: esyms: _Thread_Start_multitasking -> 0x202ee48
+rtl: esyms: _Thread_Timeout -> 0x202ee64
+rtl: esyms: _Thread_Yield -> 0x202ef08
+rtl: esyms: _Thread_queue_Compare_priority -> 0x202e200
+rtl: esyms: _Thread_queue_Dequeue -> 0x202e508
+rtl: esyms: _Thread_queue_Enqueue_critical -> 0x202e268
+rtl: esyms: _Thread_queue_Extract -> 0x202e4c8
+rtl: esyms: _Thread_queue_Extract_critical -> 0x202e498
+rtl: esyms: _Thread_queue_Extract_locked -> 0x202e3a0
+rtl: esyms: _Thread_queue_Extract_with_proxy -> 0x202e55c
+rtl: esyms: _Thread_queue_Flush -> 0x202e568
+rtl: esyms: _Thread_queue_Initialize -> 0x202e21c
+rtl: esyms: _Thread_queue_Operations_FIFO -> 0x205e8e8
+rtl: esyms: _Thread_queue_Operations_default -> 0x205e8fc
+rtl: esyms: _Thread_queue_Operations_priority -> 0x205e8d4
+rtl: esyms: _Thread_queue_Unblock_critical -> 0x202e3d0
+rtl: esyms: _Timecounter -> 0x205f9d4
+rtl: esyms: _Timecounter_Bintime -> 0x202b874
+rtl: esyms: _Timecounter_Binuptime -> 0x202b7b4
+rtl: esyms: _Timecounter_Boottimebin -> 0x2066278
+rtl: esyms: _Timecounter_Initialize -> 0x202bcd8
+rtl: esyms: _Timecounter_Install -> 0x202b960
+rtl: esyms: _Timecounter_Microtime -> 0x202b8ec
+rtl: esyms: _Timecounter_Set_clock -> 0x202b99c
+rtl: esyms: _Timecounter_Tick_simple -> 0x202bb34
+rtl: esyms: _Timecounter_Time_second -> 0x205f9cc
+rtl: esyms: _Timecounter_Time_uptime -> 0x205f9c8
+rtl: esyms: _Timer_Information -> 0x2065898
+rtl: esyms: _Timer_Manager_initialization -> 0x2028864
+rtl: esyms: _Timer_server -> 0x20658d4
+rtl: esyms: _Timespec_To_ticks -> 0x202ef48
+rtl: esyms: _Unwind_Backtrace -> 0x2015da0
+rtl: esyms: _Unwind_DeleteException -> 0x2015d7c
+rtl: esyms: _Unwind_FindEnclosingFunction -> 0x2015940
+rtl: esyms: _Unwind_Find_FDE -> 0x201738c
+rtl: esyms: _Unwind_ForcedUnwind -> 0x2015ba8
+rtl: esyms: _Unwind_GetCFA -> 0x201588c
+rtl: esyms: _Unwind_GetDataRelBase -> 0x2015970
+rtl: esyms: _Unwind_GetGR -> 0x2015824
+rtl: esyms: _Unwind_GetIP -> 0x201590c
+rtl: esyms: _Unwind_GetIPInfo -> 0x2015914
+rtl: esyms: _Unwind_GetLanguageSpecificData -> 0x2015930
+rtl: esyms: _Unwind_GetRegionStart -> 0x2015938
+rtl: esyms: _Unwind_GetTextRelBase -> 0x2015978
+rtl: esyms: _Unwind_RaiseException -> 0x2015a70
+rtl: esyms: _Unwind_Resume -> 0x2015c38
+rtl: esyms: _Unwind_Resume_or_Rethrow -> 0x2015cd4
+rtl: esyms: _Unwind_SetGR -> 0x2015894
+rtl: esyms: _Unwind_SetIP -> 0x2015928
+rtl: esyms: _User_extensions_Add_set -> 0x202f03c
+rtl: esyms: _User_extensions_Fatal_visitor -> 0x202f194
+rtl: esyms: _User_extensions_Handler_initialization -> 0x202effc
+rtl: esyms: _User_extensions_Iterate -> 0x202f1e4
+rtl: esyms: _User_extensions_List -> 0x205fa70
+rtl: esyms: _User_extensions_Switches_list -> 0x205fa64
+rtl: esyms: _User_extensions_Thread_begin_visitor -> 0x202f14c
+rtl: esyms: _User_extensions_Thread_create_visitor -> 0x202f09c
+rtl: esyms: _User_extensions_Thread_delete_visitor -> 0x202f0e0
+rtl: esyms: _User_extensions_Thread_exitted_visitor -> 0x202f170
+rtl: esyms: _User_extensions_Thread_restart_visitor -> 0x202f128
+rtl: esyms: _User_extensions_Thread_start_visitor -> 0x202f104
+rtl: esyms: _User_extensions_Thread_terminate_visitor -> 0x202f1c0
+rtl: esyms: _Watchdog_Handler_initialization -> 0x202f274
+rtl: esyms: _Watchdog_Insert -> 0x202f420
+rtl: esyms: _Watchdog_Remove -> 0x202f520
+rtl: esyms: _Watchdog_Seconds_header -> 0x2065a00
+rtl: esyms: _Watchdog_Tick -> 0x202f638
+rtl: esyms: _Watchdog_Tickle -> 0x202f584
+rtl: esyms: _Watchdog_Ticks_header -> 0x2065ae8
+rtl: esyms: _Watchdog_Ticks_since_boot -> 0x20662d8
+rtl: esyms: _Workspace_Allocate -> 0x202f86c
+rtl: esyms: _Workspace_Allocate_aligned -> 0x202f88c
+rtl: esyms: _Workspace_Allocate_or_fatal_error -> 0x202f8c4
+rtl: esyms: _Workspace_Area -> 0x2065988
+rtl: esyms: _Workspace_Free -> 0x202f8ac
+rtl: esyms: _Workspace_Handler_initialization -> 0x202f694
+rtl: esyms: _ZN10__cxxabiv111__terminateEPFvvE -> 0x201053c
+rtl: esyms: _ZN10__cxxabiv112__unexpectedEPFvvE -> 0x201060c
+rtl: esyms: _ZN10__cxxabiv117__class_type_infoD0Ev -> 0x200172c
+rtl: esyms: _ZN10__cxxabiv117__class_type_infoD1Ev -> 0x2001714
+rtl: esyms: _ZN10__cxxabiv117__class_type_infoD2Ev -> 0x2001714
+rtl: esyms: _ZN10__cxxabiv119__terminate_handlerE -> 0x205f73c
+rtl: esyms: _ZN10__cxxabiv120__si_class_type_infoD0Ev -> 0x2010744
+rtl: esyms: _ZN10__cxxabiv120__si_class_type_infoD1Ev -> 0x201072c
+rtl: esyms: _ZN10__cxxabiv120__si_class_type_infoD2Ev -> 0x201072c
+rtl: esyms: _ZN10__cxxabiv120__unexpected_handlerE -> 0x205f738
+rtl: esyms: _ZN9__gnu_cxx12__atomic_addEPVii -> 0x2010984
+rtl: esyms: _ZN9__gnu_cxx18__exchange_and_addEPVii -> 0x201094c
+rtl: esyms: _ZN9__gnu_cxx27__verbose_terminate_handlerEv -> 0x2002084
+rtl: esyms: _ZNK10__cxxabiv117__class_type_info10__do_catchEPKSt9type_infoPPvj -> 0x20017b4
+rtl: esyms: _ZNK10__cxxabiv117__class_type_info11__do_upcastEPKS0_PKvRNS0_15__upcast_resultE -> 0x200174c
+rtl: esyms: _ZNK10__cxxabiv117__class_type_info11__do_upcastEPKS0_PPv -> 0x200169c
+rtl: esyms: _ZNK10__cxxabiv117__class_type_info12__do_dyncastEiNS0_10__sub_kindEPKS0_PKvS3_S5_RNS0_16__dyncast_resultE -> 0x200183c
+rtl: esyms: _ZNK10__cxxabiv117__class_type_info20__do_find_public_srcEiPKvPKS0_S2_ -> 0x20016fc
+rtl: esyms: _ZNK10__cxxabiv120__si_class_type_info11__do_upcastEPKNS_17__class_type_infoEPKvRNS1_15__upcast_resultE -> 0x20108fc
+rtl: esyms: _ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE -> 0x2010764
+rtl: esyms: _ZNK10__cxxabiv120__si_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_ -> 0x201087c
+rtl: esyms: _ZNKSt11logic_error4whatEv -> 0x20109b4
+rtl: esyms: _ZNKSt13bad_exception4whatEv -> 0x2001abc
+rtl: esyms: _ZNKSt13runtime_error4whatEv -> 0x20109bc
+rtl: esyms: _ZNKSt14error_category10equivalentERKSt10error_codei -> 0x2010e4c
+rtl: esyms: _ZNKSt14error_category10equivalentEiRKSt15error_condition -> 0x2010ef4
+rtl: esyms: _ZNKSt14error_category23default_error_conditionEi -> 0x2010e38
+rtl: esyms: _ZNKSt9bad_alloc4whatEv -> 0x20104f8
+rtl: esyms: _ZNKSt9type_info14__is_pointer_pEv -> 0x2001ea8
+rtl: esyms: _ZNKSt9type_info15__is_function_pEv -> 0x2001eb0
+rtl: esyms: _ZNSt11logic_errorC1ERKSs -> 0x2010adc
+rtl: esyms: _ZNSt11logic_errorC2ERKSs -> 0x2010adc
+rtl: esyms: _ZNSt11logic_errorD0Ev -> 0x2010a58
+rtl: esyms: _ZNSt11logic_errorD1Ev -> 0x20109c4
+rtl: esyms: _ZNSt11logic_errorD2Ev -> 0x20109c4
+rtl: esyms: _ZNSt12length_errorC1ERKSs -> 0x2010b18
+rtl: esyms: _ZNSt12length_errorC2ERKSs -> 0x2010b18
+rtl: esyms: _ZNSt12length_errorD0Ev -> 0x2010a38
+rtl: esyms: _ZNSt12length_errorD1Ev -> 0x2010a20
+rtl: esyms: _ZNSt12length_errorD2Ev -> 0x2010a20
+rtl: esyms: _ZNSt13bad_exceptionD0Ev -> 0x2001ac8
+rtl: esyms: _ZNSt13bad_exceptionD1Ev -> 0x2001ab4
+rtl: esyms: _ZNSt13bad_exceptionD2Ev -> 0x2001ab4
+rtl: esyms: _ZNSt13runtime_errorC1ERKSs -> 0x2010b3c
+rtl: esyms: _ZNSt13runtime_errorC2ERKSs -> 0x2010b3c
+rtl: esyms: _ZNSt13runtime_errorD0Ev -> 0x2010ac8
+rtl: esyms: _ZNSt13runtime_errorD1Ev -> 0x2010a6c
+rtl: esyms: _ZNSt13runtime_errorD2Ev -> 0x2010a6c
+rtl: esyms: _ZNSt9bad_allocD0Ev -> 0x201051c
+rtl: esyms: _ZNSt9bad_allocD1Ev -> 0x2010504
+rtl: esyms: _ZNSt9bad_allocD2Ev -> 0x2010504
+rtl: esyms: _ZNSt9exceptionD1Ev -> 0x2001aac
+rtl: esyms: _ZNSt9exceptionD2Ev -> 0x2001aac
+rtl: esyms: _ZNSt9type_infoD1Ev -> 0x2001ea0
+rtl: esyms: _ZNSt9type_infoD2Ev -> 0x2001ea0
+rtl: esyms: _ZSt10unexpectedv -> 0x2010690
+rtl: esyms: _ZSt13get_terminatev -> 0x2010588
+rtl: esyms: _ZSt14get_unexpectedv -> 0x2010624
+rtl: esyms: _ZSt15get_new_handlerv -> 0x2001bc8
+rtl: esyms: _ZSt19__throw_logic_errorPKc -> 0x2011264
+rtl: esyms: _ZSt20__throw_length_errorPKc -> 0x201130c
+rtl: esyms: _ZSt9terminatev -> 0x20105f4
+rtl: esyms: _ZdlPv -> 0x2001eb8
+rtl: esyms: _Znwj -> 0x2001e28
+rtl: esyms: __DTOR_END__ -> 0x2046e78
+rtl: esyms: __DYNAMIC -> 0x0
+rtl: esyms: __TMC_END__ -> 0x205ffa0
+rtl: esyms: __any_on -> 0x20346ec
+rtl: esyms: __ascii_wctomb -> 0x203e110
+rtl: esyms: __b2d -> 0x2034370
+rtl: esyms: __bss_start -> 0x205ffa0
+rtl: esyms: __call_exitprocs -> 0x203001c
+rtl: esyms: __clz_tab -> 0x205c4f0
+rtl: esyms: __copybits -> 0x203466c
+rtl: esyms: __ctype_ptr__ -> 0x205fa84
+rtl: esyms: __cxa_allocate_exception -> 0x2001c5c
+rtl: esyms: __cxa_atexit -> 0x203023c
+rtl: esyms: __cxa_begin_catch -> 0x2001ec4
+rtl: esyms: __cxa_call_terminate -> 0x20106d0
+rtl: esyms: __cxa_call_unexpected -> 0x2002c78
+rtl: esyms: __cxa_current_exception_type -> 0x200202c
+rtl: esyms: __cxa_demangle -> 0x2010240
+rtl: esyms: __cxa_end_catch -> 0x2001f70
+rtl: esyms: __cxa_free_exception -> 0x2001d4c
+rtl: esyms: __cxa_get_globals -> 0x20019c8
+rtl: esyms: __cxa_get_globals_fast -> 0x2001974
+rtl: esyms: __cxa_rethrow -> 0x2010474
+rtl: esyms: __cxa_throw -> 0x2010400
+rtl: esyms: __d2b -> 0x2034490
+rtl: esyms: __deregister_frame -> 0x2017360
+rtl: esyms: __deregister_frame_info -> 0x2017354
+rtl: esyms: __deregister_frame_info_bases -> 0x2017218
+rtl: esyms: __divdi3 -> 0x2011bf4
+rtl: esyms: __dso_handle -> 0x205f6a4
+rtl: esyms: __end -> 0x20662e0
+rtl: esyms: __errno -> 0x20317d4
+rtl: esyms: __fp_lock_all -> 0x2031f30
+rtl: esyms: __fp_unlock_all -> 0x2031f48
+rtl: esyms: __fpclassifyd -> 0x20113b4
+rtl: esyms: __fputwc -> 0x203228c
+rtl: esyms: __frame_state_for -> 0x2015980
+rtl: esyms: __gcclibcxx_demangle_callback -> 0x2010384
+rtl: esyms: __getreent -> 0x2001318
+rtl: esyms: __gxx_personality_v0 -> 0x20027ac
+rtl: esyms: __hi0bits -> 0x2033afc
+rtl: esyms: __i2b -> 0x2033c50
+rtl: esyms: __lo0bits -> 0x2033b84
+rtl: esyms: __locale_charset -> 0x2033194
+rtl: esyms: __locale_cjk_lang -> 0x20331b8
+rtl: esyms: __locale_mb_cur_max -> 0x20331a0
+rtl: esyms: __locale_msgcharset -> 0x20331ac
+rtl: esyms: __log2table -> 0x205e7c8
+rtl: esyms: __lshift -> 0x2033fc8
+rtl: esyms: __mb_cur_max -> 0x205fdb0
+rtl: esyms: __mcmp -> 0x20340f8
+rtl: esyms: __mdiff -> 0x2034164
+rtl: esyms: __moddi3 -> 0x2012014
+rtl: esyms: __mprec_bigtens -> 0x205ed10
+rtl: esyms: __mprec_tens -> 0x205ed38
+rtl: esyms: __mprec_tinytens -> 0x205ece8
+rtl: esyms: __muldi3 -> 0x2011b2c
+rtl: esyms: __multadd -> 0x203393c
+rtl: esyms: __multiply -> 0x2033c74
+rtl: esyms: __pow5mult -> 0x2033ea4
+rtl: esyms: __ratio -> 0x20345a0
+rtl: esyms: __register_exitproc -> 0x202ff28
+rtl: esyms: __register_frame -> 0x201715c
+rtl: esyms: __register_frame_info -> 0x2017128
+rtl: esyms: __register_frame_info_bases -> 0x20170f8
+rtl: esyms: __register_frame_info_table -> 0x20171e8
+rtl: esyms: __register_frame_info_table_bases -> 0x201718c
+rtl: esyms: __register_frame_table -> 0x20171fc
+rtl: esyms: __s2b -> 0x2033a24
+rtl: esyms: __sclose -> 0x2034f30
+rtl: esyms: __seofread -> 0x2034e6c
+rtl: esyms: __sflags -> 0x2031fc8
+rtl: esyms: __sflush_r -> 0x2031934
+rtl: esyms: __sfmoreglue -> 0x2031d90
+rtl: esyms: __sfp -> 0x2031ddc
+rtl: esyms: __sfp_lock_acquire -> 0x2031f10
+rtl: esyms: __sfp_lock_release -> 0x2031f18
+rtl: esyms: __sfvwrite_r -> 0x2032a50
+rtl: esyms: __sinit -> 0x2031eec
+rtl: esyms: __sinit_lock_acquire -> 0x2031f20
+rtl: esyms: __sinit_lock_release -> 0x2031f28
+rtl: esyms: __smakebuf_r -> 0x20331fc
+rtl: esyms: __sprint_r -> 0x2039da0
+rtl: esyms: __sread -> 0x2034e18
+rtl: esyms: __srefill_r -> 0x2034b50
+rtl: esyms: __sseek -> 0x2034ebc
+rtl: esyms: __ssprint_r -> 0x2035fac
+rtl: esyms: __start_set_sysctl_set -> 0x205f6a0
+rtl: esyms: __stop_set_sysctl_set -> 0x205f6a0
+rtl: esyms: __swbuf -> 0x203dfec
+rtl: esyms: __swbuf_r -> 0x203de6c
+rtl: esyms: __swrite -> 0x2034e74
+rtl: esyms: __swsetup_r -> 0x203e17c
+rtl: esyms: __udivdi3 -> 0x2012434
+rtl: esyms: __ulp -> 0x20342e0
+rtl: esyms: __umoddi3 -> 0x201278c
+rtl: esyms: __wctomb -> 0x205fdb4
+rtl: esyms: _bss_start -> 0x205ffa0
+rtl: esyms: _calloc_r -> 0x201a7f0
+rtl: esyms: _cleanup -> 0x2031ed0
+rtl: esyms: _cleanup_r -> 0x2031c44
+rtl: esyms: _close_r -> 0x201ab10
+rtl: esyms: _ctype_ -> 0x205e9c8
+rtl: esyms: _data_start -> 0x205f6a0
+rtl: esyms: _dtoa_r -> 0x203047c
+rtl: esyms: _edata -> 0x205ffa0
+rtl: esyms: _end -> 0x20662e0
+rtl: esyms: _endtext -> 0x205f6a0
+rtl: esyms: _erodata -> 0x205f670
+rtl: esyms: _etext -> 0x205f668
+rtl: esyms: _exit -> 0x201b8c8
+rtl: esyms: _fclose_r -> 0x2031824
+rtl: esyms: _fflush_r -> 0x2031bb4
+rtl: esyms: _fini -> 0x205f688
+rtl: esyms: _fiprintf_r -> 0x2031f60
+rtl: esyms: _fopen_r -> 0x2032078
+rtl: esyms: _fputc_r -> 0x2032168
+rtl: esyms: _fputs_r -> 0x20321e0
+rtl: esyms: _fputwc_r -> 0x20323c0
+rtl: esyms: _free_r -> 0x201a804
+rtl: esyms: _fseek_r -> 0x2032430
+rtl: esyms: _fseeko_r -> 0x203246c
+rtl: esyms: _fstat_r -> 0x201ac64
+rtl: esyms: _fwalk -> 0x2032f44
+rtl: esyms: _fwalk_reent -> 0x2032fb8
+rtl: esyms: _fwrite_r -> 0x2033038
+rtl: esyms: _getpid_r -> 0x201ad44
+rtl: esyms: _gettimeofday_r -> 0x201a730
+rtl: esyms: _global_atexit -> 0x2065198
+rtl: esyms: _global_impure_ptr -> 0x205ecc8
+rtl: esyms: _impure_ptr -> 0x205fa88
+rtl: esyms: _init -> 0x205f668
+rtl: esyms: _isatty -> 0x203018c
+rtl: esyms: _isatty_r -> 0x201aef8
+rtl: esyms: _kill_r -> 0x2027210
+rtl: esyms: _localeconv_r -> 0x20331c0
+rtl: esyms: _lseek_r -> 0x201b150
+rtl: esyms: _malloc_r -> 0x201a814
+rtl: esyms: _mprec_log10 -> 0x203462c
+rtl: esyms: _open_r -> 0x201bc30
+rtl: esyms: _printf_r -> 0x20347a0
+rtl: esyms: _putc_r -> 0x203480c
+rtl: esyms: _puts_r -> 0x203495c
+rtl: esyms: _raise_r -> 0x20349fc
+rtl: esyms: _read_r -> 0x201bdf8
+rtl: esyms: _realloc_r -> 0x201a824
+rtl: esyms: _reclaim_reent -> 0x2034a4c
+rtl: esyms: _rodata_start -> 0x2046e7c
+rtl: esyms: _rtld_debug -> 0x2065400
+rtl: esyms: _rtld_debug_state -> 0x2020324
+rtl: esyms: _rtld_linkmap_add -> 0x202032c
+rtl: esyms: _rtld_linkmap_delete -> 0x20203fc
+rtl: esyms: _sdata -> 0x205f6a0
+rtl: esyms: _setlocale_r -> 0x2033128
+rtl: esyms: _sprintf_r -> 0x2034d50
+rtl: esyms: _strerror_r -> 0x203548c
+rtl: esyms: _strtoul_r -> 0x2035bf8
+rtl: esyms: _svfiprintf_r -> 0x2036180
+rtl: esyms: _svfprintf_r -> 0x2037420
+rtl: esyms: _text_start -> 0x2000000
+rtl: esyms: _user_strerror -> 0x2039b68
+rtl: esyms: _vfiprintf_r -> 0x2039dc4
+rtl: esyms: _vfprintf_r -> 0x203b548
+rtl: esyms: _vsnprintf_r -> 0x203dd7c
+rtl: esyms: _wcrtomb_r -> 0x203e008
+rtl: esyms: _wctomb_r -> 0x203e14c
+rtl: esyms: _write_r -> 0x201f9b8
+rtl: esyms: abort -> 0x20301f0
+rtl: esyms: atexit -> 0x2030208
+rtl: esyms: bcopy -> 0x2030224
+rtl: esyms: boot_card -> 0x2017538
+rtl: esyms: bsp_boot_cmdline -> 0x20652e8
+rtl: esyms: bsp_console_select -> 0x2017c98
+rtl: esyms: bsp_fatal_extension -> 0x20175e8
+rtl: esyms: bsp_idle_thread -> 0x2017660
+rtl: esyms: bsp_interrupt_facility_initialize -> 0x201808c
+rtl: esyms: bsp_interrupt_handler_default -> 0x2017fbc
+rtl: esyms: bsp_interrupt_handler_table -> 0x20652f0
+rtl: esyms: bsp_interrupt_initialize -> 0x2017fe0
+rtl: esyms: bsp_isr_handler -> 0x20175ac
+rtl: esyms: bsp_libc_init -> 0x2017674
+rtl: esyms: bsp_postdriver_hook -> 0x2017690
+rtl: esyms: bsp_predriver_hook -> 0x20176ac
+rtl: esyms: bsp_pretasking_hook -> 0x20176b8
+rtl: esyms: bsp_spurious_initialize -> 0x20186c4
+rtl: esyms: bsp_start -> 0x20176c4
+rtl: esyms: bsp_work_area_initialize -> 0x2017608
+rtl: esyms: bss_start -> 0x205ffa0
+rtl: esyms: calloc -> 0x201a6c4
+rtl: esyms: cleanup_glue -> 0x2034a28
+rtl: esyms: close -> 0x201aa94
+rtl: esyms: console_close -> 0x2017a9c
+rtl: esyms: console_control -> 0x2017c78
+rtl: esyms: console_inbyte_nonblocking -> 0x2017e10
+rtl: esyms: console_initialize -> 0x2017b1c
+rtl: esyms: console_open -> 0x2017950
+rtl: esyms: console_outbyte_polled -> 0x2017dc0
+rtl: esyms: console_read -> 0x2017c88
+rtl: esyms: console_write -> 0x2017d88
+rtl: esyms: data_start -> 0x205f6a0
+rtl: esyms: device_close -> 0x2018d28
+rtl: esyms: device_ftruncate -> 0x2018d88
+rtl: esyms: device_ioctl -> 0x2018d70
+rtl: esyms: device_open -> 0x2018d10
+rtl: esyms: device_read -> 0x2018d40
+rtl: esyms: device_write -> 0x2018d58
+rtl: esyms: dl_load_test -> 0x2001324
+rtl: esyms: dl_tar -> 0x20471f0
+rtl: esyms: dl_tar_size -> 0x20471ec
+rtl: esyms: dlclose -> 0x201fa54
+rtl: esyms: dlerror -> 0x201fb78
+rtl: esyms: dlopen -> 0x201f9d0
+rtl: esyms: dlsym -> 0x201fad8
+rtl: esyms: early_mem -> 0x205f748
+rtl: esyms: edata -> 0x205ffa0
+rtl: esyms: end -> 0x20662e0
+rtl: esyms: erc32_fns -> 0x205c630
+rtl: esyms: etext -> 0x205f670
+rtl: esyms: exception_base -> 0x2001494
+rtl: esyms: exit -> 0x20317e8
+rtl: esyms: fastlz_decompress -> 0x201fb98
+rtl: esyms: fclose -> 0x2031920
+rtl: esyms: fflush -> 0x2031c04
+rtl: esyms: fiprintf -> 0x2031f90
+rtl: esyms: fopen -> 0x203214c
+rtl: esyms: fputc -> 0x20321a0
+rtl: esyms: fputs -> 0x2032270
+rtl: esyms: fputwc -> 0x20323f0
+rtl: esyms: free -> 0x201ab20
+rtl: esyms: frexp -> 0x201143c
+rtl: esyms: fseek -> 0x203244c
+rtl: esyms: fseeko -> 0x2032a24
+rtl: esyms: fstat -> 0x201abc4
+rtl: esyms: ftruncate -> 0x201ac78
+rtl: esyms: fwrite -> 0x20330f0
+rtl: esyms: getegid -> 0x201ad0c
+rtl: esyms: geteuid -> 0x201ad24
+rtl: esyms: getpid -> 0x201ad3c
+rtl: esyms: gettimeofday -> 0x201a6f8
+rtl: esyms: hard_reset -> 0x2001000
+rtl: esyms: imfs_memfile_bytes_per_block -> 0x2064e54
+rtl: esyms: imfs_rq_memfile_bytes_per_block -> 0x205f734
+rtl: esyms: isatty -> 0x203311c
+rtl: esyms: killinfo -> 0x2027228
+rtl: esyms: libc_init -> 0x201b8f0
+rtl: esyms: libchip_serial_default_probe -> 0x2018440
+rtl: esyms: localeconv -> 0x20331e8
+rtl: esyms: lseek -> 0x201b0d8
+rtl: esyms: malloc -> 0x201b170
+rtl: esyms: malloc_deferred_free -> 0x201b278
+rtl: esyms: malloc_deferred_frees_process -> 0x201b244
+rtl: esyms: malloc_is_system_state_OK -> 0x201b21c
+rtl: esyms: memchr -> 0x2033384
+rtl: esyms: memcmp -> 0x20334a0
+rtl: esyms: memcpy -> 0x203353c
+rtl: esyms: memfile_blocks_allocated -> 0x2064e58
+rtl: esyms: memmove -> 0x2033630
+rtl: esyms: memset -> 0x203376c
+rtl: esyms: mkdir -> 0x201b31c
+rtl: esyms: mknod -> 0x201b3e4
+rtl: esyms: mount -> 0x201b570
+rtl: esyms: newlib_create_hook -> 0x201b8f8
+rtl: esyms: newlib_terminate_hook -> 0x201b9b0
+rtl: esyms: open -> 0x201b9c0
+rtl: esyms: printf -> 0x20347d4
+rtl: esyms: printk -> 0x201bcbc
+rtl: esyms: pthread_exit -> 0x202814c
+rtl: esyms: pthread_getspecific -> 0x2026ef4
+rtl: esyms: pthread_key_create -> 0x2026cd0
+rtl: esyms: pthread_key_delete -> 0x2026d3c
+rtl: esyms: pthread_kill -> 0x2028160
+rtl: esyms: pthread_self -> 0x2028240
+rtl: esyms: pthread_setspecific -> 0x20270b0
+rtl: esyms: putc -> 0x20348ac
+rtl: esyms: puts -> 0x20349e8
+rtl: esyms: raise -> 0x2034a14
+rtl: esyms: rdb_start -> 0x20007c0
+rtl: esyms: read -> 0x201bd58
+rtl: esyms: realloc -> 0x201be10
+rtl: esyms: rtems_ada_self -> 0x2065a18
+rtl: esyms: rtems_assoc_local_by_remote -> 0x201a838
+rtl: esyms: rtems_assoc_local_by_remote_bitfield -> 0x201a868
+rtl: esyms: rtems_assoc_ptr_by_local -> 0x201a8b4
+rtl: esyms: rtems_assoc_ptr_by_remote -> 0x201a934
+rtl: esyms: rtems_assoc_remote_by_local -> 0x201a9b4
+rtl: esyms: rtems_cache_get_instruction_line_size -> 0x2018758
+rtl: esyms: rtems_cache_get_maximal_line_size -> 0x2018760
+rtl: esyms: rtems_cache_instruction_sync_after_code_change -> 0x2018768
+rtl: esyms: rtems_cache_invalidate_entire_instruction -> 0x2018750
+rtl: esyms: rtems_clock_get_ticks_per_second -> 0x2028328
+rtl: esyms: rtems_counter_initialize_converter -> 0x202996c
+rtl: esyms: rtems_current_user_env_get -> 0x201bcec
+rtl: esyms: rtems_current_user_env_key -> 0x20653f0
+rtl: esyms: rtems_deviceio_close -> 0x201c0b8
+rtl: esyms: rtems_deviceio_control -> 0x201c1c0
+rtl: esyms: rtems_deviceio_open -> 0x201c084
+rtl: esyms: rtems_deviceio_read -> 0x201c0e8
+rtl: esyms: rtems_deviceio_write -> 0x201c154
+rtl: esyms: rtems_event_receive -> 0x2028388
+rtl: esyms: rtems_event_send -> 0x20285c8
+rtl: esyms: rtems_event_system_send -> 0x20290e4
+rtl: esyms: rtems_fatal -> 0x2029b3c
+rtl: esyms: rtems_fatal_error_occurred -> 0x2029b24
+rtl: esyms: rtems_filesystem_check_access -> 0x201bf94
+rtl: esyms: rtems_filesystem_default_are_nodes_equal -> 0x2018920
+rtl: esyms: rtems_filesystem_default_close -> 0x2018938
+rtl: esyms: rtems_filesystem_default_eval_path -> 0x2018940
+rtl: esyms: rtems_filesystem_default_fcntl -> 0x2018954
+rtl: esyms: rtems_filesystem_default_freenode -> 0x201895c
+rtl: esyms: rtems_filesystem_default_fstat -> 0x2018964
+rtl: esyms: rtems_filesystem_default_fsunmount -> 0x2018974
+rtl: esyms: rtems_filesystem_default_fsync_or_fdatasync -> 0x201897c
+rtl: esyms: rtems_filesystem_default_fsync_or_fdatasync_success -> 0x2018998
+rtl: esyms: rtems_filesystem_default_ftruncate -> 0x20189a0
+rtl: esyms: rtems_filesystem_default_ftruncate_directory -> 0x20189bc
+rtl: esyms: rtems_filesystem_default_ioctl -> 0x20189d8
+rtl: esyms: rtems_filesystem_default_kqfilter -> 0x20189f4
+rtl: esyms: rtems_filesystem_default_lock -> 0x20189fc
+rtl: esyms: rtems_filesystem_default_lseek -> 0x2018a2c
+rtl: esyms: rtems_filesystem_default_lseek_directory -> 0x2018a4c
+rtl: esyms: rtems_filesystem_default_lseek_file -> 0x2018a94
+rtl: esyms: rtems_filesystem_default_open -> 0x2018bb4
+rtl: esyms: rtems_filesystem_default_pathconf -> 0x205cd0c
+rtl: esyms: rtems_filesystem_default_poll -> 0x2018bbc
+rtl: esyms: rtems_filesystem_default_read -> 0x2018bc4
+rtl: esyms: rtems_filesystem_default_readv -> 0x2018be0
+rtl: esyms: rtems_filesystem_default_statvfs -> 0x2018c5c
+rtl: esyms: rtems_filesystem_default_unlock -> 0x2018a18
+rtl: esyms: rtems_filesystem_default_write -> 0x2018c78
+rtl: esyms: rtems_filesystem_default_writev -> 0x2018c94
+rtl: esyms: rtems_filesystem_do_unmount -> 0x201ca00
+rtl: esyms: rtems_filesystem_eval_path_check_access -> 0x201c050
+rtl: esyms: rtems_filesystem_eval_path_cleanup -> 0x201c62c
+rtl: esyms: rtems_filesystem_eval_path_cleanup_with_parent -> 0x201c668
+rtl: esyms: rtems_filesystem_eval_path_continue -> 0x201c33c
+rtl: esyms: rtems_filesystem_eval_path_eat_delimiter -> 0x201cdd4
+rtl: esyms: rtems_filesystem_eval_path_error -> 0x201c240
+rtl: esyms: rtems_filesystem_eval_path_generic -> 0x201c794
+rtl: esyms: rtems_filesystem_eval_path_next_token -> 0x201ce4c
+rtl: esyms: rtems_filesystem_eval_path_recursive -> 0x201c6e0
+rtl: esyms: rtems_filesystem_eval_path_restart -> 0x201c67c
+rtl: esyms: rtems_filesystem_eval_path_start -> 0x201c508
+rtl: esyms: rtems_filesystem_eval_path_start_with_parent -> 0x201c534
+rtl: esyms: rtems_filesystem_eval_path_start_with_root_and_current -> 0x201c3b0
+rtl: esyms: rtems_filesystem_get_mount_handler -> 0x201b538
+rtl: esyms: rtems_filesystem_global_location_assign -> 0x201cc88
+rtl: esyms: rtems_filesystem_global_location_null -> 0x205f824
+rtl: esyms: rtems_filesystem_global_location_obtain -> 0x201cb34
+rtl: esyms: rtems_filesystem_global_location_release -> 0x201cc20
+rtl: esyms: rtems_filesystem_handlers_default -> 0x205c984
+rtl: esyms: rtems_filesystem_initialize -> 0x201a9e4
+rtl: esyms: rtems_filesystem_iterate -> 0x201b474
+rtl: esyms: rtems_filesystem_location_clone -> 0x201aa4c
+rtl: esyms: rtems_filesystem_location_copy -> 0x201c994
+rtl: esyms: rtems_filesystem_location_copy_and_detach -> 0x201cd40
+rtl: esyms: rtems_filesystem_location_detach -> 0x201c9e4
+rtl: esyms: rtems_filesystem_location_free -> 0x201ab7c
+rtl: esyms: rtems_filesystem_location_remove_from_mt_entry -> 0x201ccb0
+rtl: esyms: rtems_filesystem_location_transform_to_global -> 0x201cd68
+rtl: esyms: rtems_filesystem_mknod -> 0x201b338
+rtl: esyms: rtems_filesystem_mount_table -> 0x205f8a0
+rtl: esyms: rtems_filesystem_null_handlers -> 0x205cbe0
+rtl: esyms: rtems_filesystem_null_mt_entry -> 0x205f848
+rtl: esyms: rtems_filesystem_root_configuration -> 0x2046fb8
+rtl: esyms: rtems_filesystem_table -> 0x2047034
+rtl: esyms: rtems_fs_init_helper -> 0x2047048
+rtl: esyms: rtems_get_version_string -> 0x2029b54
+rtl: esyms: rtems_global_user_env -> 0x205f7dc
+rtl: esyms: rtems_gxx_getspecific -> 0x201adec
+rtl: esyms: rtems_gxx_key_create -> 0x201ad58
+rtl: esyms: rtems_gxx_key_delete -> 0x201adb0
+rtl: esyms: rtems_gxx_mutex_destroy -> 0x201aec0
+rtl: esyms: rtems_gxx_mutex_init -> 0x201ae58
+rtl: esyms: rtems_gxx_mutex_lock -> 0x201ae9c
+rtl: esyms: rtems_gxx_mutex_unlock -> 0x201aedc
+rtl: esyms: rtems_gxx_once -> 0x201ad4c
+rtl: esyms: rtems_gxx_setspecific -> 0x201ae10
+rtl: esyms: rtems_heap_null_extend -> 0x201bf20
+rtl: esyms: rtems_initialize_before_drivers -> 0x2029aa0
+rtl: esyms: rtems_initialize_data_structures -> 0x20299f4
+rtl: esyms: rtems_initialize_device_drivers -> 0x2029aa8
+rtl: esyms: rtems_initialize_start_multitasking -> 0x2029abc
+rtl: esyms: rtems_interrupt_catch -> 0x2028734
+rtl: esyms: rtems_io_close -> 0x2029bac
+rtl: esyms: rtems_io_control -> 0x2029c0c
+rtl: esyms: rtems_io_initialize -> 0x2029c6c
+rtl: esyms: rtems_io_open -> 0x2029cc8
+rtl: esyms: rtems_io_read -> 0x2029d28
+rtl: esyms: rtems_io_register_name -> 0x201a694
+rtl: esyms: rtems_io_write -> 0x2029d88
+rtl: esyms: rtems_libio_allocate -> 0x201af3c
+rtl: esyms: rtems_libio_exit -> 0x201afd8
+rtl: esyms: rtems_libio_exit_helper -> 0x204704c
+rtl: esyms: rtems_libio_fcntl_flags -> 0x201af08
+rtl: esyms: rtems_libio_free -> 0x201af94
+rtl: esyms: rtems_libio_free_user_env -> 0x201bd18
+rtl: esyms: rtems_libio_init -> 0x201aff8
+rtl: esyms: rtems_libio_init_helper -> 0x2047054
+rtl: esyms: rtems_libio_iop_freelist -> 0x20653f4
+rtl: esyms: rtems_libio_iops -> 0x20651a0
+rtl: esyms: rtems_libio_number_iops -> 0x2047044
+rtl: esyms: rtems_libio_post_driver -> 0x201bc48
+rtl: esyms: rtems_libio_post_driver_helper -> 0x2047050
+rtl: esyms: rtems_libio_semaphore -> 0x20653f8
+rtl: esyms: rtems_malloc_dirty_helper -> 0x205fff8
+rtl: esyms: rtems_malloc_extend_handler -> 0x2046f78
+rtl: esyms: rtems_maximum_priority -> 0x205f6ac
+rtl: esyms: rtems_minimum_stack_size -> 0x205f6b0
+rtl: esyms: rtems_putc -> 0x201bf28
+rtl: esyms: rtems_rtl_alloc_del -> 0x20200bc
+rtl: esyms: rtems_rtl_alloc_heap -> 0x201ffa4
+rtl: esyms: rtems_rtl_alloc_initialise -> 0x201ffdc
+rtl: esyms: rtems_rtl_alloc_module_del -> 0x2020140
+rtl: esyms: rtems_rtl_alloc_module_new -> 0x202019c
+rtl: esyms: rtems_rtl_alloc_new -> 0x2020018
+rtl: esyms: rtems_rtl_base_sym_global_add -> 0x2026a9c
+rtl: esyms: rtems_rtl_baseimage -> 0x2026b18
+rtl: esyms: rtems_rtl_chain_iterate -> 0x20202dc
+rtl: esyms: rtems_rtl_check_handle -> 0x2026748
+rtl: esyms: rtems_rtl_elf_file_check -> 0x20211ac
+rtl: esyms: rtems_rtl_elf_file_load -> 0x2021278
+rtl: esyms: rtems_rtl_elf_file_sig -> 0x20219c4
+rtl: esyms: rtems_rtl_elf_file_unload -> 0x20219ac
+rtl: esyms: rtems_rtl_elf_find_symbol -> 0x2020b38
+rtl: esyms: rtems_rtl_elf_rel_resolve_sym -> 0x2021c8c
+rtl: esyms: rtems_rtl_elf_relocate_rel -> 0x2021ec8
+rtl: esyms: rtems_rtl_elf_relocate_rela -> 0x2021ca4
+rtl: esyms: rtems_rtl_elf_section_flags -> 0x2021c84
+rtl: esyms: rtems_rtl_elf_unwind_deregister -> 0x2021efc
+rtl: esyms: rtems_rtl_elf_unwind_dw2_deregister -> 0x2026104
+rtl: esyms: rtems_rtl_elf_unwind_dw2_parse -> 0x2026060
+rtl: esyms: rtems_rtl_elf_unwind_dw2_register -> 0x20260b4
+rtl: esyms: rtems_rtl_elf_unwind_parse -> 0x2021ee4
+rtl: esyms: rtems_rtl_elf_unwind_register -> 0x2021ef0
+rtl: esyms: rtems_rtl_find_file -> 0x2021a74
+rtl: esyms: rtems_rtl_find_obj -> 0x2026798
+rtl: esyms: rtems_rtl_get_error -> 0x2021a18
+rtl: esyms: rtems_rtl_global_symbols -> 0x2026154
+rtl: esyms: rtems_rtl_load_object -> 0x2026890
+rtl: esyms: rtems_rtl_lock -> 0x2026450
+rtl: esyms: rtems_rtl_match_name -> 0x2023008
+rtl: esyms: rtems_rtl_obj_add_section -> 0x202370c
+rtl: esyms: rtems_rtl_obj_alloc -> 0x2022d3c
+rtl: esyms: rtems_rtl_obj_cache_close -> 0x2021f74
+rtl: esyms: rtems_rtl_obj_cache_flush -> 0x2021fc4
+rtl: esyms: rtems_rtl_obj_cache_open -> 0x2021f08
+rtl: esyms: rtems_rtl_obj_cache_read -> 0x202200c
+rtl: esyms: rtems_rtl_obj_cache_read_byval -> 0x202248c
+rtl: esyms: rtems_rtl_obj_caches -> 0x20261bc
+rtl: esyms: rtems_rtl_obj_caches_flush -> 0x202622c
+rtl: esyms: rtems_rtl_obj_comp -> 0x202626c
+rtl: esyms: rtems_rtl_obj_comp_close -> 0x202256c
+rtl: esyms: rtems_rtl_obj_comp_open -> 0x20224f4
+rtl: esyms: rtems_rtl_obj_comp_read -> 0x20225c8
+rtl: esyms: rtems_rtl_obj_comp_set -> 0x20225ac
+rtl: esyms: rtems_rtl_obj_find_file -> 0x2023678
+rtl: esyms: rtems_rtl_obj_find_section -> 0x20237e8
+rtl: esyms: rtems_rtl_obj_find_section_by_index -> 0x2023814
+rtl: esyms: rtems_rtl_obj_free -> 0x2022d7c
+rtl: esyms: rtems_rtl_obj_load -> 0x2023df4
+rtl: esyms: rtems_rtl_obj_load_sections -> 0x20239a0
+rtl: esyms: rtems_rtl_obj_load_symbols -> 0x202392c
+rtl: esyms: rtems_rtl_obj_relocate -> 0x2023840
+rtl: esyms: rtems_rtl_obj_relocate_unresolved -> 0x2021020
+rtl: esyms: rtems_rtl_obj_run_ctors -> 0x2023dd4
+rtl: esyms: rtems_rtl_obj_run_dtors -> 0x2023de4
+rtl: esyms: rtems_rtl_obj_synchronize_cache -> 0x20238b4
+rtl: esyms: rtems_rtl_obj_unload -> 0x2023f50
+rtl: esyms: rtems_rtl_parse_name -> 0x2022e88
+rtl: esyms: rtems_rtl_rap_file_check -> 0x2024170
+rtl: esyms: rtems_rtl_rap_file_load -> 0x2024238
+rtl: esyms: rtems_rtl_rap_file_sig -> 0x20250f4
+rtl: esyms: rtems_rtl_rap_file_unload -> 0x20250ec
+rtl: esyms: rtems_rtl_set_error -> 0x20219d0
+rtl: esyms: rtems_rtl_strdup -> 0x2025100
+rtl: esyms: rtems_rtl_symbol_global_add -> 0x2025310
+rtl: esyms: rtems_rtl_symbol_global_find -> 0x2025250
+rtl: esyms: rtems_rtl_symbol_obj_add -> 0x2025614
+rtl: esyms: rtems_rtl_symbol_obj_erase -> 0x202568c
+rtl: esyms: rtems_rtl_symbol_obj_erase_local -> 0x202565c
+rtl: esyms: rtems_rtl_symbol_obj_find -> 0x2025580
+rtl: esyms: rtems_rtl_symbol_table_close -> 0x202523c
+rtl: esyms: rtems_rtl_symbol_table_open -> 0x202519c
+rtl: esyms: rtems_rtl_trace -> 0x2025724
+rtl: esyms: rtems_rtl_trace_set_mask -> 0x202573c
+rtl: esyms: rtems_rtl_unload_object -> 0x20269b8
+rtl: esyms: rtems_rtl_unlock -> 0x202629c
+rtl: esyms: rtems_rtl_unresolved -> 0x2026188
+rtl: esyms: rtems_rtl_unresolved_add -> 0x2025b84
+rtl: esyms: rtems_rtl_unresolved_interate -> 0x20259b8
+rtl: esyms: rtems_rtl_unresolved_resolve -> 0x2025e94
+rtl: esyms: rtems_rtl_unresolved_table_close -> 0x2025984
+rtl: esyms: rtems_rtl_unresolved_table_open -> 0x2025958
+rtl: esyms: rtems_semaphore_create -> 0x20288dc
+rtl: esyms: rtems_semaphore_delete -> 0x2028af8
+rtl: esyms: rtems_semaphore_obtain -> 0x2028c6c
+rtl: esyms: rtems_semaphore_release -> 0x2028f20
+rtl: esyms: rtems_shutdown_executive -> 0x2029ad4
+rtl: esyms: rtems_status_code_to_errno -> 0x20290a0
+rtl: esyms: rtems_task_create -> 0x2029130
+rtl: esyms: rtems_task_delete -> 0x2029264
+rtl: esyms: rtems_task_mode -> 0x20293c4
+rtl: esyms: rtems_task_start -> 0x20297a0
+rtl: esyms: rtems_task_wake_after -> 0x202989c
+rtl: esyms: rtems_termios_baud_table -> 0x205ce10
+rtl: esyms: rtems_termios_close -> 0x201dbdc
+rtl: esyms: rtems_termios_enqueue_raw_characters -> 0x201eef8
+rtl: esyms: rtems_termios_initialize -> 0x201f304
+rtl: esyms: rtems_termios_ioctl -> 0x201dcd4
+rtl: esyms: rtems_termios_linesw -> 0x2064e68
+rtl: esyms: rtems_termios_number_to_baud -> 0x201f2ac
+rtl: esyms: rtems_termios_open -> 0x201dae8
+rtl: esyms: rtems_termios_puts -> 0x201e17c
+rtl: esyms: rtems_termios_read -> 0x201eaa8
+rtl: esyms: rtems_termios_set_initial_baud -> 0x201f2c4
+rtl: esyms: rtems_termios_ttyMutex -> 0x20653fc
+rtl: esyms: rtems_termios_write -> 0x201e9cc
+rtl: esyms: rtems_test_begin_with_plugin -> 0x202fbf4
+rtl: esyms: rtems_test_end_with_plugin -> 0x202fc18
+rtl: esyms: rtems_test_fatal_extension -> 0x202fc3c
+rtl: esyms: rtems_test_name -> 0x2047058
+rtl: esyms: rtems_timecounter_simple_install -> 0x2029eb8
+rtl: esyms: set_vector -> 0x2018448
+rtl: esyms: setlocale -> 0x20331cc
+rtl: esyms: sigemptyset -> 0x20282bc
+rtl: esyms: sparc_syscall_exit -> 0x20188c4
+rtl: esyms: sprintf -> 0x2034db0
+rtl: esyms: start -> 0x2000000
+rtl: esyms: stat -> 0x201bf44
+rtl: esyms: strchr -> 0x2034f40
+rtl: esyms: strcmp -> 0x2035104
+rtl: esyms: strcpy -> 0x20351d0
+rtl: esyms: strerror -> 0x20358a8
+rtl: esyms: strlen -> 0x20358c4
+rtl: esyms: strncmp -> 0x2035984
+rtl: esyms: strncpy -> 0x2035ab0
+rtl: esyms: strrchr -> 0x2035bb4
+rtl: esyms: strtoul -> 0x2035e1c
+rtl: esyms: symlink -> 0x201cf64
+rtl: esyms: syscall -> 0x20188c0
+rtl: esyms: syscall_irqdis -> 0x20188e0
+rtl: esyms: syscall_irqen -> 0x2018900
+rtl: esyms: text_start -> 0x2000000
+rtl: esyms: time -> 0x2039b28
+rtl: esyms: trap_table -> 0x2000000
+rtl: esyms: unlink -> 0x201f354
+rtl: esyms: vfiprintf -> 0x203b314
+rtl: esyms: vfprintf -> 0x203dcb4
+rtl: esyms: vprintk -> 0x201f3d8
+rtl: esyms: vsnprintf -> 0x203de40
+rtl: esyms: wcrtomb -> 0x203e088
+rtl: esyms: window_flush_trap_handler -> 0x20187fc
+rtl: esyms: window_overflow_trap_handler -> 0x2018770
+rtl: esyms: window_underflow_trap_handler -> 0x20187ac
+rtl: esyms: write -> 0x201f918
+rtl: esyms: _ZGVNSt10moneypunctIcLb0EE2idE -> 0x2064d50
+rtl: esyms: _ZGVNSt10moneypunctIcLb1EE2idE -> 0x2064d48
+rtl: esyms: _ZGVNSt10moneypunctIwLb0EE2idE -> 0x2064cf0
+rtl: esyms: _ZGVNSt10moneypunctIwLb1EE2idE -> 0x2064ce8
+rtl: esyms: _ZGVNSt11__timepunctIcE2idE -> 0x2064d18
+rtl: esyms: _ZGVNSt11__timepunctIwE2idE -> 0x2064cb8
+rtl: esyms: _ZGVNSt7collateIcE2idE -> 0x2064cf8
+rtl: esyms: _ZGVNSt7collateIwE2idE -> 0x2064c98
+rtl: esyms: _ZGVNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d28
+rtl: esyms: _ZGVNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064cc8
+rtl: esyms: _ZGVNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d20
+rtl: esyms: _ZGVNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064cc0
+rtl: esyms: _ZGVNSt8messagesIcE2idE -> 0x2064d00
+rtl: esyms: _ZGVNSt8messagesIwE2idE -> 0x2064ca0
+rtl: esyms: _ZGVNSt8numpunctIcE2idE -> 0x2064d30
+rtl: esyms: _ZGVNSt8numpunctIwE2idE -> 0x2064cd0
+rtl: esyms: _ZGVNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d08
+rtl: esyms: _ZGVNSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064ca8
+rtl: esyms: _ZGVNSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d10
+rtl: esyms: _ZGVNSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064cb0
+rtl: esyms: _ZGVNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d40
+rtl: esyms: _ZGVNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064ce0
+rtl: esyms: _ZGVNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE -> 0x2064d38
+rtl: esyms: _ZGVNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE -> 0x2064cd8
+rtl: esyms: _ZN16dl_test_throw_meD1Ev -> 0x200148c
+rtl: esyms: _ZN16dl_test_throw_meD2Ev -> 0x200148c
+rtl: esyms: _ZN17__eh_globals_initD1Ev -> 0x2001908
+rtl: esyms: _ZN17__eh_globals_initD2Ev -> 0x2001908
+rtl: esyms: _ZN9__gnu_cxx15_Atomicity_lockILi0EE17_S_atomicity_lockE -> 0x2064c90
+rtl: esyms: _ZN9__gnu_cxx24__concurrence_lock_errorD0Ev -> 0x2001b1c
+rtl: esyms: _ZN9__gnu_cxx24__concurrence_lock_errorD1Ev -> 0x2001aec
+rtl: esyms: _ZN9__gnu_cxx24__concurrence_lock_errorD2Ev -> 0x2001aec
+rtl: esyms: _ZN9__gnu_cxx26__concurrence_unlock_errorD0Ev -> 0x2001b3c
+rtl: esyms: _ZN9__gnu_cxx26__concurrence_unlock_errorD1Ev -> 0x2001b04
+rtl: esyms: _ZN9__gnu_cxx26__concurrence_unlock_errorD2Ev -> 0x2001b04
+rtl: esyms: _ZN9__gnu_cxx30__throw_concurrence_lock_errorEv -> 0x2001b68
+rtl: esyms: _ZN9__gnu_cxx32__throw_concurrence_unlock_errorEv -> 0x2001b98
+rtl: esyms: _ZN9__gnu_cxx7__mutexD1Ev -> 0x2001b5c
+rtl: esyms: _ZN9__gnu_cxx7__mutexD2Ev -> 0x2001b5c
+rtl: esyms: _ZNK9__gnu_cxx24__concurrence_lock_error4whatEv -> 0x2001ad4
+rtl: esyms: _ZNK9__gnu_cxx26__concurrence_unlock_error4whatEv -> 0x2001ae0
+rtl: esyms: _ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag -> 0x2011158
+rtl: esyms: _ZNSs4_Rep10_M_destroyERKSaIcE -> 0x201104c
+rtl: esyms: _ZNSs4_Rep20_S_empty_rep_storageE -> 0x2064d58
+rtl: esyms: _ZNSs4_Rep8_M_cloneERKSaIcEj -> 0x2011058
+rtl: esyms: _ZNSs4_Rep9_S_createEjjRKSaIcE -> 0x2010fb4
+rtl: esyms: _ZNSsC1EPKcRKSaIcE -> 0x20111fc
+rtl: esyms: _ZNSsC1ERKSs -> 0x20110f0
+rtl: esyms: _ZNSsC2EPKcRKSaIcE -> 0x20111fc
+rtl: esyms: _ZNSsC2ERKSs -> 0x20110f0
+rtl: esyms: _ZTI16dl_test_throw_me -> 0x20471d0
+rtl: esyms: _ZTIN10__cxxabiv115__forced_unwindE -> 0x205ace8
+rtl: esyms: _ZTIN10__cxxabiv117__class_type_infoE -> 0x205ac2c
+rtl: esyms: _ZTIN10__cxxabiv119__foreign_exceptionE -> 0x205ad14
+rtl: esyms: _ZTIN10__cxxabiv120__si_class_type_infoE -> 0x205c128
+rtl: esyms: _ZTIN9__gnu_cxx24__concurrence_lock_errorE -> 0x205ad88
+rtl: esyms: _ZTIN9__gnu_cxx26__concurrence_unlock_errorE -> 0x205adc0
+rtl: esyms: _ZTISt11logic_error -> 0x205c178
+rtl: esyms: _ZTISt12length_error -> 0x205c19c
+rtl: esyms: _ZTISt13bad_exception -> 0x205acbc
+rtl: esyms: _ZTISt13runtime_error -> 0x205c1bc
+rtl: esyms: _ZTISt14error_category -> 0x205c2ac
+rtl: esyms: _ZTISt9bad_alloc -> 0x205c0d8
+rtl: esyms: _ZTISt9exception -> 0x205aca0
+rtl: esyms: _ZTISt9type_info -> 0x205ae40
+rtl: esyms: _ZTS16dl_test_throw_me -> 0x20471d8
+rtl: esyms: _ZTSN10__cxxabiv115__forced_unwindE -> 0x205acc8
+rtl: esyms: _ZTSN10__cxxabiv117__class_type_infoE -> 0x205ac08
+rtl: esyms: _ZTSN10__cxxabiv119__foreign_exceptionE -> 0x205acf0
+rtl: esyms: _ZTSN10__cxxabiv120__si_class_type_infoE -> 0x205c100
+rtl: esyms: _ZTSN9__gnu_cxx24__concurrence_lock_errorE -> 0x205ad98
+rtl: esyms: _ZTSN9__gnu_cxx26__concurrence_unlock_errorE -> 0x205add0
+rtl: esyms: _ZTSSt11logic_error -> 0x205c168
+rtl: esyms: _ZTSSt12length_error -> 0x205c188
+rtl: esyms: _ZTSSt13bad_exception -> 0x205aca8
+rtl: esyms: _ZTSSt13runtime_error -> 0x205c1a8
+rtl: esyms: _ZTSSt14error_category -> 0x205c298
+rtl: esyms: _ZTSSt9bad_alloc -> 0x205c0c8
+rtl: esyms: _ZTSSt9exception -> 0x205ac90
+rtl: esyms: _ZTSSt9type_info -> 0x205ae30
+rtl: esyms: _ZTVN10__cxxabiv117__class_type_infoE -> 0x205ac38
+rtl: esyms: _ZTVN10__cxxabiv120__si_class_type_infoE -> 0x205c138
+rtl: esyms: _ZTVN9__gnu_cxx24__concurrence_lock_errorE -> 0x205ae00
+rtl: esyms: _ZTVN9__gnu_cxx26__concurrence_unlock_errorE -> 0x205ae18
+rtl: esyms: _ZTVSt11logic_error -> 0x205c1c8
+rtl: esyms: _ZTVSt12length_error -> 0x205c1e0
+rtl: esyms: _ZTVSt13bad_exception -> 0x205ad20
+rtl: esyms: _ZTVSt13runtime_error -> 0x205c1f8
+rtl: esyms: _ZTVSt9bad_alloc -> 0x205c0e8
+rtl: esyms: rtems_rtl_base_global_syms_init -> 0x2001680
+rtl: loading '/dl-o5.o'
+rtl: alloc: new: OBJECT addr=0x208fa40 size=9
+rtl: alloc: del: OBJECT addr=0x0
+rtl: alloc: new: OBJECT addr=0x20a2fb0 size=144
+rtl: alloc: new: OBJECT addr=0x208fa58 size=9
+rtl: alloc: new: OBJECT addr=0x208fa70 size=9
+rtl: section header: 0: offset=41488
+rtl: section: 0: type=0 flags=00000000 link=0 info=0
+rtl: section header: 1: offset=41528
+rtl: section: 1: type=17 flags=00000000 link=33 info=21
+rtl: unsupported section: 1: type=17 flags=00
+rtl: section header: 2: offset=41568
+rtl: section: 2: type=17 flags=00000000 link=33 info=38
+rtl: unsupported section: 2: type=17 flags=00
+rtl: section header: 3: offset=41608
+rtl: section: 3: type=17 flags=00000000 link=33 info=48
+rtl: unsupported section: 3: type=17 flags=00
+rtl: section header: 4: offset=41648
+rtl: section: 4: type=1 flags=00000006 link=0 info=0
+rtl: section header: 5: offset=41688
+rtl: section: 5: type=1 flags=00000003 link=0 info=0
+rtl: section header: 6: offset=41728
+rtl: section: 6: type=8 flags=00000003 link=0 info=0
+rtl: section header: 7: offset=41768
+rtl: section: 7: type=1 flags=00000206 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a3048 size=56
+rtl: alloc: new: OBJECT addr=0x20a3088 size=32
+rtl: sect: 7 : .text._ZN16dl_test_throw_meD2Ev (8)
+rtl: section header: 8: offset=41808
+rtl: section: 8: type=1 flags=00000032 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a30b0 size=56
+rtl: alloc: new: OBJECT addr=0x208fa88 size=15
+rtl: sect: 8 : .rodata.str1.8 (181)
+rtl: section header: 9: offset=41848
+rtl: section: 9: type=1 flags=00000006 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a30f0 size=56
+rtl: alloc: new: OBJECT addr=0x20a3130 size=19
+rtl: sect: 9 : .text.exception_dl (504)
+rtl: section header: 10: offset=41888
+rtl: section: 10: type=4 flags=00000040 link=33 info=9
+rtl: alloc: new: OBJECT addr=0x20a3150 size=56
+rtl: alloc: new: OBJECT addr=0x20a3190 size=24
+rtl: sect: 10: .rela.text.exception_dl (732)
+rtl: section header: 11: offset=41928
+rtl: section: 11: type=1 flags=00000002 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a31b0 size=56
+rtl: alloc: new: OBJECT addr=0x20a31f0 size=31
+rtl: sect: 11: .gcc_except_table.exception_dl (80)
+rtl: section header: 12: offset=41968
+rtl: section: 12: type=4 flags=00000040 link=33 info=11
+rtl: alloc: new: OBJECT addr=0x20a3218 size=56
+rtl: alloc: new: OBJECT addr=0x20a3258 size=36
+rtl: sect: 12: .rela.gcc_except_table.exception_dl (24)
+rtl: section header: 13: offset=42008
+rtl: section: 13: type=1 flags=00000002 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a3288 size=56
+rtl: alloc: new: OBJECT addr=0x20a32c8 size=36
+rtl: sect: 13: .rodata._ZZ12exception_dlE8__func__ (13)
+rtl: section header: 14: offset=42048
+rtl: section: 14: type=1 flags=00000202 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a32f8 size=56
+rtl: alloc: new: OBJECT addr=0x20a3338 size=31
+rtl: sect: 14: .rodata._ZTI16dl_test_throw_me (8)
+rtl: section header: 15: offset=42088
+rtl: section: 15: type=4 flags=00000040 link=33 info=14
+rtl: alloc: new: OBJECT addr=0x20a3360 size=56
+rtl: alloc: new: OBJECT addr=0x20a33a0 size=36
+rtl: sect: 15: .rela.rodata._ZTI16dl_test_throw_me (24)
+rtl: section header: 16: offset=42128
+rtl: section: 16: type=1 flags=00000202 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a33d0 size=56
+rtl: alloc: new: OBJECT addr=0x20a3410 size=31
+rtl: sect: 16: .rodata._ZTS16dl_test_throw_me (19)
+rtl: section header: 17: offset=42168
+rtl: section: 17: type=1 flags=00000000 link=0 info=0
+rtl: section header: 18: offset=42208
+rtl: section: 18: type=4 flags=00000040 link=33 info=17
+rtl: alloc: new: OBJECT addr=0x20a3438 size=56
+rtl: alloc: new: OBJECT addr=0x20a3478 size=17
+rtl: sect: 18: .rela.debug_info (9048)
+rtl: section header: 19: offset=42248
+rtl: section: 19: type=1 flags=00000000 link=0 info=0
+rtl: section header: 20: offset=42288
+rtl: section: 20: type=1 flags=00000000 link=0 info=0
+rtl: section header: 21: offset=42328
+rtl: section: 21: type=4 flags=00000040 link=33 info=20
+rtl: alloc: new: OBJECT addr=0x20a3498 size=56
+rtl: alloc: new: OBJECT addr=0x20a34d8 size=16
+rtl: sect: 21: .rela.debug_loc (732)
+rtl: section header: 22: offset=42368
+rtl: section: 22: type=1 flags=00000000 link=0 info=0
+rtl: section header: 23: offset=42408
+rtl: section: 23: type=4 flags=00000040 link=33 info=22
+rtl: alloc: new: OBJECT addr=0x20a34f0 size=56
+rtl: alloc: new: OBJECT addr=0x20a3530 size=20
+rtl: sect: 23: .rela.debug_aranges (36)
+rtl: section header: 24: offset=42448
+rtl: section: 24: type=1 flags=00000000 link=0 info=0
+rtl: section header: 25: offset=42488
+rtl: section: 25: type=4 flags=00000040 link=33 info=24
+rtl: alloc: new: OBJECT addr=0x20a3550 size=56
+rtl: alloc: new: OBJECT addr=0x20a3590 size=19
+rtl: sect: 25: .rela.debug_ranges (576)
+rtl: section header: 26: offset=42528
+rtl: section: 26: type=1 flags=00000000 link=0 info=0
+rtl: section header: 27: offset=42568
+rtl: section: 27: type=4 flags=00000040 link=33 info=26
+rtl: alloc: new: OBJECT addr=0x20a35b0 size=56
+rtl: alloc: new: OBJECT addr=0x20a35f0 size=17
+rtl: sect: 27: .rela.debug_line (24)
+rtl: section header: 28: offset=42608
+rtl: section: 28: type=1 flags=00000030 link=0 info=0
+rtl: section header: 29: offset=42648
+rtl: section: 29: type=1 flags=00000030 link=0 info=0
+rtl: section header: 30: offset=42688
+rtl: section: 30: type=1 flags=00000002 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a3610 size=56
+rtl: alloc: new: OBJECT addr=0x20a3650 size=10
+rtl: sect: 30: .eh_frame (96)
+rtl: section header: 31: offset=42728
+rtl: section: 31: type=4 flags=00000040 link=33 info=30
+rtl: alloc: new: OBJECT addr=0x20a3668 size=56
+rtl: alloc: new: OBJECT addr=0x20a36a8 size=15
+rtl: sect: 31: .rela.eh_frame (48)
+rtl: section header: 32: offset=42768
+rtl: section: 32: type=3 flags=00000000 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a36c0 size=56
+rtl: alloc: new: OBJECT addr=0x20a3700 size=10
+rtl: sect: 32: .shstrtab (399)
+rtl: section header: 33: offset=42808
+rtl: section: 33: type=2 flags=00000000 link=34 info=26
+rtl: alloc: new: OBJECT addr=0x20a3718 size=56
+rtl: alloc: new: OBJECT addr=0x20a3758 size=8
+rtl: sect: 33: .symtab (784)
+rtl: section header: 34: offset=42848
+rtl: section: 34: type=3 flags=00000000 link=0 info=0
+rtl: alloc: new: OBJECT addr=0x20a3768 size=56
+rtl: alloc: new: OBJECT addr=0x20a37a8 size=8
+rtl: sect: 34: .strtab (569)
+rtl: alloc: new: READ_EXEC addr=0x20a37b8 size=520
+rtl: alloc: new: READ addr=0x20a39c8 size=231
+rtl: alloc: new: READ addr=0x20a3ab8 size=176
+rtl: load sect: text - b:0x20a37b8 s:520 a:4
+rtl: load sect: const - b:0x20a39c8 s:231 a:8
+rtl: load sect: eh - b:0x20a3ab8 s:176 a:4
+rtl: load sect: data - b:0x0 s:0 a:0
+rtl: load sect: bss - b:0x0 s:0 a:0
+rtl: loading: 0: .text._ZN16dl_test_throw_meD2Ev -> 0x20a37b8 (s:8 f:0401 a:4 l:00)
+rtl: loading: 1: .text.exception_dl -> 0x20a37c0 (s:504 f:0401 a:4 l:00)
+rtl: loading: 0: .rodata.str1.8 -> 0x20a39c8 (s:181 f:0402 a:8 l:00)
+rtl: loading: 1: .rodata._ZZ12exception_dlE8__func__ -> 0x20a3a80 (s:13 f:0402 a:8 l:00)
+rtl: loading: 2: .rodata._ZTI16dl_test_throw_me -> 0x20a3a90 (s:8 f:0402 a:4 l:00)
+rtl: loading: 3: .rodata._ZTS16dl_test_throw_me -> 0x20a3a98 (s:19 f:0402 a:8 l:00)
+rtl: loading: 0: .gcc_except_table.exception_dl -> 0x20a3ab8 (s:80 f:0410 a:4 l:00)
+rtl: loading: 1: .eh_frame -> 0x20a3b08 (s:96 f:0410 a:4 l:00)
+rtl: alloc: new: SYMBOL addr=0x20a3b70 size=48
+rtl: alloc: new: SYMBOL addr=0x20a3ba8 size=211
+rtl: sym:add:8 name:11:_ZZ12exception_dlE8__func__ bind:0 type:1 val:0x20a3a80 sect:13 size:13
+rtl: sym:add:26 name:65:_ZN16dl_test_throw_meD2Ev bind:2 type:2 val:0x20a37b8 sect:7 size:8
+rtl: sym:add:27 name:91:_ZN16dl_test_throw_meD1Ev bind:2 type:2 val:0x20a37b8 sect:7 size:8
+rtl: sym:add:28 name:117:exception_dl bind:1 type:2 val:0x20a37c0 sect:9 size:504
+rtl: sym:add:38 name:321:_ZTI16dl_test_throw_me bind:2 type:1 val:0x20a3a90 sect:14 size:8
+rtl: sym:add:48 name:546:_ZTS16dl_test_throw_me bind:2 type:1 val:0x20a3a98 sect:16 size:19
+rtl: relocation: .rela.text.exception_dl, syms:.symtab
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000004 addend:0
+rtl: HI22 0x1100828e @ 0x20a37c4 in /dl-o5.o
+rtl: rela: sym:puts(30)=020349e8 type:7 off:00000008 addend:0
+rtl: WDISP_30 0x7ffe4488 @ 0x20a37c8 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:0000000c addend:0
+rtl: LO10 0x901221c8 @ 0x20a37cc in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000010 addend:24
+rtl: HI22 0x1100828e @ 0x20a37d0 in /dl-o5.o
+rtl: rela: sym:puts(30)=020349e8 type:7 off:00000014 addend:0
+rtl: WDISP_30 0x7ffe4485 @ 0x20a37d4 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:00000018 addend:24
+rtl: LO10 0x901221e0 @ 0x20a37d8 in /dl-o5.o
+rtl: rela: sym:__cxa_allocate_exception(31)=02001c5c type:7 off:00000028 addend:0
+rtl: WDISP_30 0x7ffd791d @ 0x20a37e8 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000030 addend:56
+rtl: HI22 0x1300828e @ 0x20a37f0 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:00000038 addend:56
+rtl: LO10 0x92126200 @ 0x20a37f8 in /dl-o5.o
+rtl: rela: sym:_ZNSsC1EPKcRKSaIcE(32)=020111fc type:7 off:00000040 addend:0
+rtl: WDISP_30 0x7ffdb67f @ 0x20a3800 in /dl-o5.o
+rtl: rela: sym:_ZNSt13runtime_errorC1ERKSs(33)=02010b3c type:7 off:0000004c addend:0
+rtl: WDISP_30 0x7ffdb4cc @ 0x20a380c in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep20_S_empty_rep_storageE(34)=02064d58 type:9 off:00000058 addend:0
+rtl: HI22 0x3008193 @ 0x20a3818 in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep20_S_empty_rep_storageE(34)=02064d58 type:12 off:00000060 addend:0
+rtl: LO10 0x82106158 @ 0x20a3820 in /dl-o5.o
+rtl: rela: sym:_ZTISt13runtime_error(35)=0205c1bc type:9 off:00000070 addend:0
+rtl: HI22 0x13008170 @ 0x20a3830 in /dl-o5.o
+rtl: rela: sym:_ZNSt13runtime_errorD1Ev(36)=02010a6c type:9 off:00000074 addend:0
+rtl: HI22 0x15008042 @ 0x20a3834 in /dl-o5.o
+rtl: rela: sym:_ZTISt13runtime_error(35)=0205c1bc type:12 off:0000007c addend:0
+rtl: LO10 0x921261bc @ 0x20a383c in /dl-o5.o
+rtl: rela: sym:__cxa_throw(37)=02010400 type:7 off:00000080 addend:0
+rtl: WDISP_30 0x7ffdb2f0 @ 0x20a3840 in /dl-o5.o
+rtl: rela: sym:_ZNSt13runtime_errorD1Ev(36)=02010a6c type:12 off:00000084 addend:0
+rtl: LO10 0x9412a26c @ 0x20a3844 in /dl-o5.o
+rtl: rela: sym:__cxa_allocate_exception(31)=02001c5c type:7 off:00000088 addend:0
+rtl: WDISP_30 0x7ffd7905 @ 0x20a3848 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000090 addend:88
+rtl: HI22 0x300828e @ 0x20a3850 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:00000094 addend:88
+rtl: LO10 0x82106220 @ 0x20a3854 in /dl-o5.o
+rtl: rela: sym:(null)(38)=020a3a90 type:9 off:00000098 addend:0
+rtl: HI22 0x1300828e @ 0x20a3858 in /dl-o5.o
+rtl: rela: sym:(null)(27)=020a37b8 type:9 off:0000009c addend:0
+rtl: HI22 0x1500828d @ 0x20a385c in /dl-o5.o
+rtl: rela: sym:(null)(38)=020a3a90 type:12 off:000000a4 addend:0
+rtl: LO10 0x92126290 @ 0x20a3864 in /dl-o5.o
+rtl: rela: sym:__cxa_throw(37)=02010400 type:7 off:000000a8 addend:0
+rtl: WDISP_30 0x7ffdb2e6 @ 0x20a3868 in /dl-o5.o
+rtl: rela: sym:(null)(27)=020a37b8 type:12 off:000000ac addend:0
+rtl: LO10 0x9412a3b8 @ 0x20a386c in /dl-o5.o
+rtl: rela: sym:_ZN9__gnu_cxx18__exchange_and_addEPVii(39)=0201094c type:7 off:000000b0 addend:0
+rtl: WDISP_30 0x7ffdb437 @ 0x20a3870 in /dl-o5.o
+rtl: rela: sym:_ZTISt13runtime_error(35)=0205c1bc type:9 off:000000c0 addend:0
+rtl: HI22 0x13008170 @ 0x20a3880 in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep10_M_destroyERKSaIcE(40)=0201104c type:7 off:000000c8 addend:0
+rtl: WDISP_30 0x7ffdb5f1 @ 0x20a3888 in /dl-o5.o
+rtl: rela: sym:_ZTISt13runtime_error(35)=0205c1bc type:9 off:000000d4 addend:0
+rtl: HI22 0x13008170 @ 0x20a3894 in /dl-o5.o
+rtl: rela: sym:__cxa_begin_catch(41)=02001ec4 type:7 off:000000f0 addend:0
+rtl: WDISP_30 0x7ffd7985 @ 0x20a38b0 in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:9 off:00000108 addend:0
+rtl: HI22 0x1300828e @ 0x20a38c8 in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:12 off:00000110 addend:0
+rtl: LO10 0x92126280 @ 0x20a38d0 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000114 addend:120
+rtl: HI22 0x1100828e @ 0x20a38d4 in /dl-o5.o
+rtl: rela: sym:printf(42)=020347d4 type:7 off:00000118 addend:0
+rtl: WDISP_30 0x7ffe43bf @ 0x20a38d8 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:0000011c addend:120
+rtl: LO10 0x90122240 @ 0x20a38dc in /dl-o5.o
+rtl: rela: sym:__cxa_end_catch(43)=02001f70 type:7 off:00000120 addend:0
+rtl: WDISP_30 0x7ffd79a4 @ 0x20a38e0 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000128 addend:136
+rtl: HI22 0x1100828e @ 0x20a38e8 in /dl-o5.o
+rtl: rela: sym:puts(30)=020349e8 type:7 off:0000012c addend:0
+rtl: WDISP_30 0x7ffe443f @ 0x20a38ec in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:00000130 addend:136
+rtl: LO10 0x90122250 @ 0x20a38f0 in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep20_S_empty_rep_storageE(34)=02064d58 type:9 off:00000140 addend:0
+rtl: HI22 0x3008193 @ 0x20a3900 in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep20_S_empty_rep_storageE(34)=02064d58 type:12 off:00000148 addend:0
+rtl: LO10 0x82106158 @ 0x20a3908 in /dl-o5.o
+rtl: rela: sym:__cxa_free_exception(44)=02001d4c type:7 off:00000158 addend:0
+rtl: WDISP_30 0x7ffd790d @ 0x20a3918 in /dl-o5.o
+rtl: rela: sym:__cxa_begin_catch(41)=02001ec4 type:7 off:0000016c addend:0
+rtl: WDISP_30 0x7ffd7966 @ 0x20a392c in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:00000174 addend:160
+rtl: HI22 0x1100828e @ 0x20a3934 in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:9 off:00000178 addend:0
+rtl: HI22 0x1300828e @ 0x20a3938 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:0000017c addend:160
+rtl: LO10 0x90122268 @ 0x20a393c in /dl-o5.o
+rtl: rela: sym:printf(42)=020347d4 type:7 off:00000180 addend:0
+rtl: WDISP_30 0x7ffe43a5 @ 0x20a3940 in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:12 off:00000184 addend:0
+rtl: LO10 0x92126280 @ 0x20a3944 in /dl-o5.o
+rtl: rela: sym:__cxa_begin_catch(41)=02001ec4 type:7 off:0000018c addend:0
+rtl: WDISP_30 0x7ffd795e @ 0x20a394c in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:9 off:00000198 addend:0
+rtl: HI22 0x1300828e @ 0x20a3958 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:9 off:0000019c addend:120
+rtl: HI22 0x1100828e @ 0x20a395c in /dl-o5.o
+rtl: rela: sym:(null)(10)=020a3a80 type:12 off:000001a0 addend:0
+rtl: LO10 0x92126280 @ 0x20a3960 in /dl-o5.o
+rtl: rela: sym:printf(42)=020347d4 type:7 off:000001a4 addend:0
+rtl: WDISP_30 0x7ffe439c @ 0x20a3964 in /dl-o5.o
+rtl: rela: sym:(null)(6)=020a39c8 type:12 off:000001a8 addend:120
+rtl: LO10 0x90122240 @ 0x20a3968 in /dl-o5.o
+rtl: rela: sym:__cxa_end_catch(43)=02001f70 type:7 off:000001b0 addend:0
+rtl: WDISP_30 0x7ffd7980 @ 0x20a3970 in /dl-o5.o
+rtl: rela: sym:_Unwind_Resume(45)=02015c38 type:7 off:000001b8 addend:0
+rtl: WDISP_30 0x7ffdc8b0 @ 0x20a3978 in /dl-o5.o
+rtl: rela: sym:__cxa_end_catch(43)=02001f70 type:7 off:000001c0 addend:0
+rtl: WDISP_30 0x7ffd797c @ 0x20a3980 in /dl-o5.o
+rtl: rela: sym:_Unwind_Resume(45)=02015c38 type:7 off:000001c8 addend:0
+rtl: WDISP_30 0x7ffdc8ac @ 0x20a3988 in /dl-o5.o
+rtl: rela: sym:_ZN9__gnu_cxx18__exchange_and_addEPVii(39)=0201094c type:7 off:000001d4 addend:0
+rtl: WDISP_30 0x7ffdb3ee @ 0x20a3994 in /dl-o5.o
+rtl: rela: sym:_ZNSs4_Rep10_M_destroyERKSaIcE(40)=0201104c type:7 off:000001ec addend:0
+rtl: WDISP_30 0x7ffdb5a8 @ 0x20a39ac in /dl-o5.o
+rtl: relocation: .rela.gcc_except_table.exception_dl, syms:.symtab
+rtl: rela: sym:_ZTISt9exception(46)=0205aca0 type:3 off:00000048 addend:0
+rtl: RELOC_32 0x205aca0 @ 0x20a3b00 in /dl-o5.o
+rtl: rela: sym:(null)(38)=020a3a90 type:3 off:0000004c addend:0
+rtl: RELOC_32 0x20a3a90 @ 0x20a3b04 in /dl-o5.o
+rtl: relocation: .rela.rodata._ZTI16dl_test_throw_me, syms:.symtab
+rtl: rela: sym:_ZTVN10__cxxabiv117__class_type_infoE(47)=0205ac38 type:3 off:00000000 addend:8
+rtl: RELOC_32 0x205ac40 @ 0x20a3a90 in /dl-o5.o
+rtl: rela: sym:(null)(48)=020a3a98 type:3 off:00000004 addend:0
+rtl: RELOC_32 0x20a3a98 @ 0x20a3a94 in /dl-o5.o
+rtl: relocation: .rela.eh_frame, syms:.symtab
+rtl: rela: sym:(null)(5)=020a37b8 type:6 off:0000001c addend:0
+rtl: DISP_32 0xfffffc94 @ 0x20a3b24 in /dl-o5.o
+rtl: rela: sym:__gxx_personality_v0(29)=020027ac type:23 off:0000003b addend:0
+rtl: UA_32 0x0 @ 0x20a3b43 in /dl-o5.o
+rtl: rela: sym:(null)(7)=020a37c0 type:6 off:0000004c addend:0
+rtl: DISP_32 0xfffffc6c @ 0x20a3b54 in /dl-o5.o
+rtl: rela: sym:(null)(9)=020a3ab8 type:23 off:00000055 addend:0
+rtl: UA_32 0x0 @ 0x20a3b5d in /dl-o5.o
+rtl: alloc: del: SYMBOL addr=0x20a3b70
+rtl: alloc: new: OBJECT addr=0x20a3c88 size=148
+rtl: linkmap_add
+rtl: unresolv: global resolve
+exception_base: begin
+exception_base: caught: eb: throw std::runtime_error
+exception_base: end
+exception_dl: begin
+exception_dl: throwing...
+exception_dl: caught: throw std::runtime_error object
+exception_dl: end
+rtl: unloading '/dl-o5.o'
+rtl: alloc: del: READ_WRITE addr=0x0
+rtl: alloc: del: READ_WRITE addr=0x0
+rtl: alloc: del: READ addr=0x20a3ab8
+rtl: alloc: del: READ addr=0x20a39c8
+rtl: alloc: del: READ_EXEC addr=0x20a37b8
+rtl: alloc: del: SYMBOL addr=0x20a3ba8
+rtl: alloc: del: OBJECT addr=0x208fa58
+rtl: alloc: del: OBJECT addr=0x208fa70
+rtl: alloc: del: OBJECT addr=0x20a3c88
+rtl: alloc: del: OBJECT addr=0x20a2fb0
+*** END OF TEST libdl (RTL) 5 ***
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
new file mode 100644
index 0000000000..62513f3fa8
--- /dev/null
+++ b/testsuites/libtests/dl05/init.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <errno.h>
+#include <string.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <rtems/rtl/rtl.h>
+#include <rtems/untar.h>
+
+#include "dl-load.h"
+
+const char rtems_test_name[] = "libdl (RTL) 5";
+
+/* forward declarations to avoid warnings */
+static rtems_task Init(rtems_task_argument argument);
+
+#include "dl-tar.h"
+
+#define TARFILE_START dl_tar
+#define TARFILE_SIZE dl_tar_size
+
+static int test(void)
+{
+ int ret;
+ ret = dl_load_test();
+ if (ret)
+ rtems_test_exit(ret);
+ return 0;
+}
+
+static void Init(rtems_task_argument arg)
+{
+ int te;
+
+ TEST_BEGIN();
+
+ te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+ if (te != 0)
+ {
+ printf("untar failed: %d\n", te);
+ rtems_test_exit(1);
+ exit (1);
+ }
+
+ test();
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (32U * 1024U)
+
+#define CONFIGURE_EXTRA_TASK_STACKS (64 * 1024)
+
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 2
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 4
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>