5
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved. |
---|
3 | * |
---|
4 | * The license and distribution terms for this file may be |
---|
5 | * found in the file LICENSE in this distribution or at |
---|
6 | * http://www.rtems.org/license/LICENSE. |
---|
7 | */ |
---|
8 | |
---|
9 | #ifdef HAVE_CONFIG_H |
---|
10 | #include "config.h" |
---|
11 | #endif |
---|
12 | |
---|
13 | #include "tmacros.h" |
---|
14 | |
---|
15 | #include <stdio.h> |
---|
16 | |
---|
17 | #include <dlfcn.h> |
---|
18 | |
---|
19 | #include <rtems/rtl/rtl-trace.h> |
---|
20 | |
---|
21 | #include "dl-load.h" |
---|
22 | |
---|
23 | int dl_load_test(void) |
---|
24 | { |
---|
25 | void* handle; |
---|
26 | const char* err; |
---|
27 | |
---|
28 | rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL); |
---|
29 | handle = dlopen("/dl-o4.o", RTLD_GLOBAL | RTLD_NOW); |
---|
30 | err = dlerror(); |
---|
31 | if (err != NULL) |
---|
32 | printf("dlopen: %s\n", err); |
---|
33 | rtems_test_assert(handle != NULL); |
---|
34 | rtems_test_assert(dlclose(handle) == 0); |
---|
35 | |
---|
36 | return 0; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.