Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>_crt0_startup_flags</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_crt0_startup_flags
===================

Syntax
------

     #include <crt0.h>
     
     int _crt0_startup_flags = ...;

Description
-----------

This variable can be used to determine what the startup code will (or
will not) do when the program begins.  This can be used to tailor the
startup environment to a particular program.

`_CRT0_FLAG_PRESERVE_UPPER_CASE'
     If set, argv[0] is left in whatever case it was.  If not set, all
     characters are mapped to lower case.  Note that if the argv0 field
     in the stubinfo structure is present, the case of that part of
     argv0 is not affected.

`_CRT0_FLAG_USE_DOS_SLASHES'
     If set, reverse slashes (dos-style) are preserved in argv[0].  If
     not set, all reverse slashes are replaced with unix-style slashes.

`_CRT0_FLAG_DROP_EXE_SUFFIX'
     If set, the .EXE suffix is removed from the file name component of
     argv[0].  If not set, the suffix remains.

`_CRT0_FLAG_DROP_DRIVE_SPECIFIER'
     If set, the drive specifier (ex: `C:') is removed from the
     beginning of argv[0] (if present).  If not set, the drive
     specifier remains.

`_CRT0_FLAG_DISALLOW_RESPONSE_FILES'
     If set, response files (ex: @gcc.rf) are not expanded.  If not
     set, the contents of the response files are used to create
     arguments.  Note that if the file does not exist, that argument
     remains unexpanded.

`_CRT0_FLAG_FILL_SBRK_MEMORY'
     If set, fill sbrk()'d memory with a constant value.  If not, memory
     gets whatever happens to have been in there, which breaks some
     applications.

`_CRT0_FLAG_FILL_DEADBEEF'
     If set, fill memory (above) with 0xdeadbeef, else fill with zero.
     This is especially useful for debugging uninitialized memory
     problems.

`_CRT0_FLAG_NEARPTR'
     If set, set DS limit to 4GB which allows use of near pointers to
     DOS (and other) memory.  WARNING, disables memory protection and
     bad pointers may crash the machine or wipe out your data.

`_CRT0_FLAG_NULLOK'
     If set, disable NULL pointer protection (if it can be controlled
     at all).

`_CRT0_FLAG_NMI_SIGNAL'
     If set, enabled capture of NMI in exception code.  This may cause
     problems with laptops and "green" boxes which use it to wake up.
     Default is to leave NMIs alone and pass through to real mode code.
     You decide.

`_CRT0_FLAG_NO_LFN'
     If set, disable usage of long file name functions even on systems
     (such as Win95) which support them.  This might be needed to work
     around program assumptions on file name format on programs written
     specifically for DOS.  Note that this flag overrides the value of
     the environment variable `LFN'.

`_CRT0_FLAG_NONMOVE_SBRK'
     If set, the sbrk() algorithm used used multiple DPMI memory blocks
     which makes sure the base of CS/DS/SS does not change.  This may
     cause problems with sbrk(0) values and programs with other
     assumptions about sbrk behavior.  This flag is useful with near
     pointers, since a constant pointer to DOS/Video memory can be
     computed without needing to reload it after any routine which
     might call sbrk().

`_CRT0_FLAG_UNIX_SBRK'
     If set, the sbrk() algorithm used resizes memory blocks so that
     the layout of memory is set up to be the most compatible with unix
     sbrk() expectations.  This mode should not be used with hardware
     interrupts, near pointers, and may cause problems with QDPMI
     virtual memory.  If your program requires a specific sbrk()
     behavior, you should set one of these flags, since the default may
     change in different libc releases.

`_CRT0_FLAG_LOCK_MEMORY'
     If set, locks all memory as it is allocated.  This effectively
     disables virtual memory, and may be useful if using extensive
     hardware interrupt codes in a relatively small image size.  The
     memory is locked after it is sbrk()ed, so the locking may fail.
     This bit may be set or cleared during execution.  When sbrk() uses
     multiple memory zones, it can be difficult to lock all memory
     since the memory block size and location is impossible to
     determine.

`_CRT0_FLAG_PRESERVE_FILENAME_CASE'
     If set, disables all filename letter-case conversions in functions
     that traverse directories (except findfirst/findnext which always
     return the filenames exactly as found in the directory entry).
     When reset, all filenames on 8+3 MSDOS filesystems and DOS-style
     8+3 filenames on LFN systems are converted to lower-case by
     functions such as `readdir', `getcwd', `_fixpath' and others.
     Note that when this flag is set, ALL filenames on MSDOS systems
     will appear in upper-case, which is both ugly and will break many
     Unix-born programs.  Use only if you know exactly what you are
     doing!

     This flag overrides the value of the environment variable `FNCASE',
     _preserve_fncase:.   


See Also: _preserve_fncase

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson