summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/dl09/dl-load.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-08-21 11:15:13 +1000
committerChris Johns <chrisj@rtems.org>2023-08-27 07:31:49 +1000
commitb9f11607b1731bc5f2391653cd8f4ebe48ba278e (patch)
tree1d466a0a7667bbb7c1b66286e6e0fdd84a1ddec6 /testsuites/libtests/dl09/dl-load.c
parentspec/testsuite/dl: Fix optimization flags (diff)
downloadrtems-b9f11607b1731bc5f2391653cd8f4ebe48ba278e.tar.bz2
libdl: Realloc text memory if there are trampolines
- Add resize to the allocator interface - Rework the trampoline variables in the obj struct to make better sense of what is happening Closes #4944
Diffstat (limited to '')
-rw-r--r--testsuites/libtests/dl09/dl-load.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/testsuites/libtests/dl09/dl-load.c b/testsuites/libtests/dl09/dl-load.c
index ce9708c3a3..216fb5a201 100644
--- a/testsuites/libtests/dl09/dl-load.c
+++ b/testsuites/libtests/dl09/dl-load.c
@@ -116,8 +116,12 @@ static void dl_check_resolved(void* handle, bool has_unresolved)
rtems_test_assert (unresolved == 0);
}
}
- printf ("handel: %p: %sunresolved externals\n",
- handle, unresolved != 0 ? "" : "no ");
+ if (handle == RTLD_SELF)
+ printf ("handle: RTL_SELF: %sunresolved externals\n",
+ unresolved != 0 ? "" : "no ");
+ else
+ printf ("handle: %p: %sunresolved externals\n",
+ handle, unresolved != 0 ? "" : "no ");
}
static void* dl_load_obj (const char* name, bool has_unresolved)
@@ -152,12 +156,20 @@ static void dl_close (void* handle)
static int dl_call (void* handle, const char* func)
{
+ static call_sig last_call;
call_sig call = dlsym (handle, func);
if (call == NULL)
{
printf("dlsym failed: symbol not found: %s\n", func);
return 1;
}
+ if (last_call != NULL && last_call != call)
+ {
+ printf("Call location different: moved by: %i (call:%p last:%p)\n",
+ (int) (call - last_call),
+ call, last_call);
+ }
+ last_call = call;
call ();
return 0;
}