This enables Palacios' internal implementation of vsnrprintf
+config BUILT_IN_USERSPACE_SYMS
+ bool "Enable build in versions of user space symbols needed"
+ default y
+ help
+ This enables a set of dummy symbols corresponding to user space.
+ This is needed to link user space libraries such as XED.
+
+
+config BUILT_IN_STDIN
+ bool "FILE * stdin;"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes the stdin file pointer
+
+config BUILT_IN_STDOUT
+ bool "FILE * stdout;"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes the stdout file pointer
+
+config BUILT_IN_STDERR
+ bool "FILE * stderr;"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes the stderr file pointer
+
+
+config BUILT_IN_FPRINTF
+ bool "fprintf();"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes fprintf()
+
+config BUILT_IN_PRINTF
+ bool "printf();"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes printf();
+
+config BUILT_IN_FFLUSH
+ bool "fflush();"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes fflush()
+
+config BUILT_IN_ABORT
+ bool "abort();"
+ default y
+ depends on BUILT_IN_USERSPACE_SYMS
+ help
+ Includes abort();
+
+
endmenu
/* Standard I/O predefined streams
*/
static FILE _streams = {0, 0, 0, 0, 0, NULL, NULL, 0, 0};
+#ifdef CONFIG_BUILT_IN_STDIN
FILE *stdin = (&_streams);
+#endif
+
+#ifdef CONFIG_BUILT_IN_STDOUT
FILE *stdout = (&_streams);
+#endif
+
+#ifdef CONFIG_BUILT_IN_STDERR
FILE *stderr = (&_streams);
+#endif
-int fprintf(FILE *file, char *fmt, ...)
-{
+#ifdef CONFIG_BUILT_IN_FPRINTF
+int fprintf(FILE *file, char *fmt, ...) {
// PrintDebug("In fprintf!!\n");
-
return 0;
}
+#endif
-int printf(char *fmt, ...)
-{
+#ifdef CONFIG_BUILT_IN_PRINTF
+int printf(char *fmt, ...) {
// PrintDebug("In fprintf!!\n");
-
return 0;
-
}
+#endif
-int fflush(FILE *stream)
-{
+#ifdef CONFIG_BUILT_IN_FFLUSH
+int fflush(FILE *stream) {
//PrintDebug("In fflush!!\n");
-
return 0;
}
+#endif
+#ifdef CONFIG_BUILT_IN_ABORT
void abort(void)
{
//PrintDebug("Abort!!\n");
//__asm__ __volatile__("trap");
//__builtin_unreached();
-
- while(1);
-
+ while(1);
}
+#endif