dl01, dl02, dl05: Fix unresolved printf symbol

The link time wrap of printf leads to unresolved symbols in the loadable
modules.  This resulted in infinite loops and test timeouts.  Use
rtems_printf() for output.

Update #3199.
This commit is contained in:
Sebastian Huber
2017-11-15 07:55:43 +01:00
parent 2727bc7f80
commit 62119d21da
4 changed files with 18 additions and 11 deletions

View File

@@ -6,14 +6,13 @@
* http://www.rtems.org/license/LICENSE.
*/
#include <stdio.h>
#include <stdlib.h>
/**
* Hello World as a loadable module.
*/
#include <stdio.h>
#include <rtems/test.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
/*
* Yes a decl in the source. This is a modules main and I could not find which

View File

@@ -6,12 +6,13 @@
* http://www.rtems.org/license/LICENSE.
*/
#include <stdio.h>
#include <stdlib.h>
#include "dl-o2.h"
#include <dlfcn.h>
#include "dl-o2.h"
#include <rtems/test.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
typedef int (*func1_t)(int argc, const char* argv[]);

View File

@@ -6,10 +6,12 @@
* http://www.rtems.org/license/LICENSE.
*/
#include <stdio.h>
#include "dl-o2.h"
#include <rtems/test.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
int dl_o2_func1 (int argc, char* argv[])
{
int arg;

View File

@@ -1,6 +1,11 @@
#include <cstdio>
#include <stdexcept>
#include "dl-load.h" /* make the symbol a C linkage */
#include <stdexcept>
#include <rtems/test.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
void exception_dl(bool throw_runtime)
{
printf("exception_dl: begin\n");