Xv6 with picoc & Linkage editor  v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
 All Data Structures
dietfeatures.h
00001 #ifndef _DIETFEATURES_H
00002 #define _DIETFEATURES_H
00003 
00004 /* feel free to comment some of these out to reduce code size */
00005 
00006 #define WANT_FLOATING_POINT_IN_PRINTF
00007 #define WANT_FLOATING_POINT_IN_SCANF
00008 #define WANT_CHARACTER_CLASSES_IN_SCANF
00009 #define WANT_NULL_PRINTF
00010 /* #define WANT_ERROR_PRINTF */
00011 #define WANT_LONGLONG_PRINTF
00012 #define WANT_LONGLONG_SCANF
00013 
00014 /* 128 or 2048 bytes buffer size? */
00015 /* #define WANT_SMALL_STDIO_BUFS */
00016 
00017 /* want fread to read() directly if size of data is larger than buffer?
00018  * This costs a few bytes but is worth it if the application is already
00019  * buffering. */
00020 #define WANT_FREAD_OPTIMIZATION
00021 
00022 /* this is only for meaningful for ttyname and sysconf_cpus so far */
00023 #define SLASH_PROC_OK
00024 
00025 /* use errno_location instead of errno; NEEDED FOR MULTI-THREADING! */
00026 #undef WANT_THREAD_SAFE
00027 
00028 /* support __thread; NEEDED FOR MULTI-THREADING! */
00029 #define WANT_TLS
00030 
00031 /* make the startcode, etc. dynamic aware ({con,de}structors) */
00032 /* #define WANT_DYNAMIC */
00033 
00034 /* GDB support in the dynamic linker */
00035 #define WANT_LD_SO_GDB_SUPPORT
00036 
00037 /* do you want smaller or faster string routines? */
00038 #define WANT_FASTER_STRING_ROUTINES
00039 
00040 /* define this to have strncpy zero-fill and not just zero-terminate the
00041  * string */
00042 /* #define WANT_FULL_POSIX_COMPAT */
00043 
00044 /* on i386, Linux has an alternate syscall method since 2002/12/16 */
00045 /* on my Athlon XP, it is twice as fast, but it's only in kernel 2.5 */
00046 /* 20040118: enabling this breaks User Mode Linux!  It's their fault. */
00047 #define WANT_SYSENTER
00048 
00049 #define WANT_LINKER_WARNINGS
00050 
00051 /* you need to define this if you want to run your programs with large
00052  * file support on kernel 2.2 or 2.0 */
00053 #define WANT_LARGEFILE_BACKCOMPAT
00054 
00055 /* do you want localtime(3) to read /etc/localtime?
00056  * Needed for daylight saving time etc. */
00057 #define WANT_TZFILE_PARSER
00058 
00059 /* do you want the DNS routines to parse and use "domain" and "search"
00060  * lines from /etc/resolv.conf?  Normally not used on boot floppies and
00061  * embedded environments. */
00062 #define WANT_FULL_RESOLV_CONF
00063 
00064 /* do you want IPv6 transport support in the DNS resolver? */
00065 #define WANT_IPV6_DNS
00066 
00067 /* do you want gethostbyname and friends to consult /etc/hosts? */
00068 #define WANT_ETC_HOSTS
00069 
00070 /* do you want gethostbyname to understand dotted decimal IP numbers
00071  * directly and not try to resolve them? */
00072 #define WANT_INET_ADDR_DNS
00073 
00074 /* do you want math functions high precision rather than fast/small? */
00075 #define WANT_HIGH_PRECISION_MATH
00076 
00077 /* do you want support for matherr? */
00078 #define WANT_MATHERR
00079 
00080 /* do you want crypt(3) to use MD5 if the salt starts with "$1$"? */
00081 #define WANT_CRYPT_MD5
00082 
00083 /* do you want diet to include a safeguard dependency to make linking
00084  * against glibc fail?  This may fail with older binutils. */
00085 #define WANT_SAFEGUARD
00086 
00087 /* This enables zeroconf DNS aka Rendezvous aka Bonjour. */
00088 /* This code will try zeroconf DNS if you ask for host.local or if you
00089  * ask for an unqualified hostname */
00090 #define WANT_PLUGPLAY_DNS
00091 
00092 /* This enables LLMNR, the MS variant of zeroconf DNS.  This only works
00093  * if you also enabled WANT_PLUGPLAY_DNS */
00094 #define WANT_LLMNR
00095 
00096 /* Uncomment this if you want DNS lookups to fail if /etc/hosts contains
00097  * an entry but it's for a different record type */
00098 /* #define WANT_HOSTS_GIVEUP_EARLY */
00099 
00100 /* Do you want valgrind support?  If enabled, the startup code will
00101  * check for valgrind, and if detected, turn off optimized SIMD string
00102  * routines that cause false positives in valgrind.  This enlarges and
00103  * slightly slows down your code! */
00104 #define WANT_VALGRIND_SUPPORT
00105 
00106 /* do you want that malloc(0) return a pointer to a "zero-length" object
00107  * that is realloc-able; means realloc(..,size) gives a NEW object (like a
00108  * call to malloc(size)).
00109  * WARNING: this violates C99 */
00110 /* #define WANT_MALLOC_ZERO */
00111 
00112 /* do you want free to overwrite freed data immediately, in the hope of
00113  * catching people accessing pointers after they were freed?  This does
00114  * a memset with 0x55 as a value. which is not NULL and not -1.  Please
00115  * note that this is the shotgun method for debugging, what you really
00116  * want is valgrind. */
00117 /* #define WANT_FREE_OVERWRITE */
00118 
00119 /* This enables a stack gap.  Basically, the start code does not run
00120  * main but stackgap, which then does alloca(random()) and calls main.
00121  * The effect is that buffer overflow exploits will no longer be able to
00122  * know the address of the buffer.  Cost: 62 bytes code on x86. */
00123 /* WARNING: this appears to break with some binutils versions.  Works
00124  * for me with binutils 2.15.  The symptom is an error message that
00125  * `main' can not be found. */
00126 /* #define WANT_STACKGAP */
00127 
00128 /* #define this if you want GNU bloat like program_invocation_short_name
00129  * and program_invocation_name to be there.  This functionality is not
00130  * portable and adds useless bloat to libc.  Help stomp out code
00131  * depending on this!  util-linux, I'm looking at you here! */
00132 #define WANT_GNU_STARTUP_BLOAT
00133 
00134 /* Include support for ProPolice/SSP, calls guard_setup */
00135 /* ProPolice is part of gcc 4.1 and up, there were patches for earlier
00136  * versions.  To make use of this, compile your application with
00137  * -fstack-protector. */
00138 /* If you compile dietlibc without WANT_SSP and then try to link code
00139  * compiled with -fstack-protector against it, the binary will segfault
00140  * when calling that code. */
00141 #if (__GNUC__>4) || ((__GNUC__==4) && (__GNUC_MINOR__>=1))
00142 #define WANT_SSP
00143 #endif
00144 
00145 
00146 
00147 /* stop uncommenting here ;-) */
00148 
00149 /* Several 'syscalls' on x86_64 need vdso set... */
00150 #if defined(__x86_64__) && ! defined(WANT_STACKGAP)
00151 #define WANT_STACKGAP
00152 #endif
00153 
00154 #if defined(WANT_SSP) || defined(WANT_STACKGAP) || defined(WANT_TLS)
00155 #define CALL_IN_STARTCODE stackgap
00156 #else
00157 #define CALL_IN_STARTCODE main
00158 #endif
00159 
00160 #ifndef WANT_FASTER_STRING_ROUTINES
00161 #define WANT_SMALL_STRING_ROUTINES
00162 #endif
00163 
00164 #ifdef WANT_THREAD_SAFE
00165 #ifndef __ASSEMBLER__
00166 #define errno (*__errno_location())
00167 #define _REENTRANT
00168 #endif
00169 #endif
00170 
00171 #ifdef __DYN_LIB
00172 /* with shared libraries you MUST have a dynamic aware startcode */
00173 #ifndef WANT_DYNAMIC
00174 #define WANT_DYNAMIC
00175 #endif
00176 /* saveguard crashes with shared objects ... */
00177 #ifdef WANT_SAFEGUARD
00178 #undef WANT_SAFEGUARD
00179 #endif
00180 #endif
00181 
00182 #endif
 All Data Structures