diff options
author | Chris Johns <chrisj@rtems.org> | 2019-02-02 15:09:53 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-02-05 10:15:09 +1100 |
commit | 849bcc6ddcf5f66bc9909e925ffaef0a0cb8e75b (patch) | |
tree | 3c23d004b9ce8d16e7b23e019f2c20d2806608c3 /testsuites/libtests/dl02/dl-o2.c | |
parent | 7a893fc98c0673dbcb28d50989c3b055701603aa (diff) |
libdl: Add powerpc large memory and small data support.libdl-epics-support
- Add support for architecure sections that can be handled by the
architecture back end.
- Add trampoline/fixup support for PowerPC. This means the PowerPC
now supports large memory loading of applications.
- Add a bit allocator to manage small block based regions of memory.
- Add small data (sdata/sbss) support for the PowerPC. The support
makes the linker allocated small data region of memory a global
resource available to libdl loaded object files.
Updates #3687
Updates #3685
Diffstat (limited to 'testsuites/libtests/dl02/dl-o2.c')
-rw-r--r-- | testsuites/libtests/dl02/dl-o2.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuites/libtests/dl02/dl-o2.c b/testsuites/libtests/dl02/dl-o2.c index 4c1a918dea..507333535b 100644 --- a/testsuites/libtests/dl02/dl-o2.c +++ b/testsuites/libtests/dl02/dl-o2.c @@ -10,7 +10,7 @@ #include <rtems/test.h> -#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__); +#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__) int dl_o2_func1 (int argc, char* argv[]) { @@ -21,13 +21,17 @@ int dl_o2_func1 (int argc, char* argv[]) return argc; } +#define PDOUBLE(_d) ((int) (_d)), (int) (((_d) + 0.005) * 100.0) % 100 + double dl_o2_func2 (double d1, double d2) { - return d1 * d2; + double ret = d1 * d2; + printf("dl_o2_func2: d1=%d.%02d d2=%d.%d ret=%d.%02d\n", + PDOUBLE(d1), PDOUBLE(d2), PDOUBLE(ret)); + return ret; } int dl_o2_func3 (dl_o2_call_t callback, int count) { return callback ("string in dl_o2", count + 1); } - |