mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
Cygwin: fix or delete a few comments to drop 32 bit references
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
4ce1a1ddc4
commit
1f962581ff
@ -35,8 +35,7 @@ bool NO_COPY wsock_started;
|
||||
* the call. If this is an odd value then this
|
||||
* is a flag that non-existence of this function
|
||||
* is not a fatal error
|
||||
* func addr (8 bytes) (64 bit ONLY!)
|
||||
* Address of the actual Win32 function. For the
|
||||
* func addr (8 bytes) Address of the actual Win32 function. For the
|
||||
* reason why this is necessary, see the below
|
||||
* description of the load_state.
|
||||
* func name (n bytes) asciz string containing the name of the function
|
||||
@ -49,7 +48,7 @@ bool NO_COPY wsock_started;
|
||||
* gets the process's load address, changes the contents
|
||||
* here to point to the function address, and changes
|
||||
* the address argument of the initial jmp call.
|
||||
* On 64 bit, the jmp is not tweaked directly. Rather,
|
||||
* On x86_64, the jmp is not tweaked directly. Rather,
|
||||
* the address of the Win32 function is stored in the
|
||||
* aforementioned Win32 function address slot and fetched
|
||||
* there for a jmp *%rax call. This indirection is
|
||||
|
@ -1649,10 +1649,9 @@ _cygtls::call_signal_handler ()
|
||||
NOTE:
|
||||
|
||||
We DO NOT change the TEB's stack addresses and we DO NOT move the
|
||||
_cygtls area to the alternate stack. This seems to work fine on
|
||||
32 and 64 bit, but there may be Windows functions not working
|
||||
correctly under these circumstances. Especially 32 bit exception
|
||||
handling may be broken.
|
||||
_cygtls area to the alternate stack. This seems to work fine,
|
||||
but there may be Windows functions not working correctly under
|
||||
these circumstances.
|
||||
|
||||
On the other hand, if a Windows function crashed and we're handling
|
||||
this here, moving the TEB stack addresses may be fatal.
|
||||
@ -1752,7 +1751,7 @@ _cygtls::signal_debugger (siginfo_t& si)
|
||||
if (incyg)
|
||||
c._CX_instPtr = retaddr ();
|
||||
memcpy (&context.uc_mcontext, &c, sizeof (CONTEXT));
|
||||
/* Enough space for 32/64 bit addresses */
|
||||
/* Enough space for 64 bit addresses */
|
||||
char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING
|
||||
" ffffffff ffffffffffffffff")];
|
||||
__small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %y %p",
|
||||
|
@ -1504,7 +1504,7 @@ fhandler_dev_null::fhandler_dev_null () :
|
||||
ssize_t
|
||||
fhandler_dev_null::write (const void *ptr, size_t len)
|
||||
{
|
||||
/* Shortcut. This also fixes a problem with the NUL device on 64 bit:
|
||||
/* Shortcut. This also fixes a problem with the NUL device on x86_64:
|
||||
If you write > 4 GB in a single attempt, the bytes written returned
|
||||
from by is numBytes & 0xffffffff. */
|
||||
return len;
|
||||
|
@ -29,13 +29,14 @@ static ptrdiff_t page_const;
|
||||
static uintptr_t
|
||||
eval_start_address ()
|
||||
{
|
||||
/* On 64 bit, we choose a fixed address outside the 32 bit area. The
|
||||
executable starts at 0x1:00400000L, the Cygwin DLL starts at
|
||||
0x1:80040000L, other rebased DLLs are located in the region from
|
||||
0x2:00000000L up to 0x4:00000000L, -auto-image-based DLLs are located
|
||||
in the region from 0x4:00000000L up to 0x6:00000000L. Thread stacks
|
||||
are located in the region from 0x6:00000000L up to 0x8:00000000L.
|
||||
So the heap starts at 0x8:00000000L. */
|
||||
/* We choose a fixed address outside the low 32 bit arena, which is
|
||||
exclusively used by the OS now:
|
||||
- The executable starts at 0x1:00400000L
|
||||
- The Cygwin DLL starts at 0x1:80040000L
|
||||
- Rebased DLLs are located from 0x2:00000000L up to 0x4:00000000L
|
||||
- auto-image-based DLLs are located from 0x4:00000000L up to 0x6:00000000L
|
||||
- Thread stacks are located from 0x6:00000000L up to 0x8:00000000L.
|
||||
- So the heap starts at 0x8:00000000L. */
|
||||
uintptr_t start_address = 0x800000000L;
|
||||
return start_address;
|
||||
}
|
||||
|
@ -284,7 +284,6 @@ class mmap_record
|
||||
LIST_ENTRY (mmap_record) mr_next;
|
||||
|
||||
private:
|
||||
/* 4 byte on 32 bit, 8 byte on 64 bit */
|
||||
HANDLE mapping_hdl;
|
||||
SIZE_T len;
|
||||
caddr_t base_address;
|
||||
|
@ -63,9 +63,8 @@ class mtinfo_drive
|
||||
lock_state lock;
|
||||
TAPE_GET_DRIVE_PARAMETERS _dp;
|
||||
TAPE_GET_MEDIA_PARAMETERS _mp;
|
||||
/* sizeof(OVERLAPPED) == 20 on 32 bit, 32 on 64 bit. A drive is always
|
||||
opened exclusively by a single process, though, so instead of the
|
||||
OVERLAPPED structure, we just keep track of the pointer to the
|
||||
/* A drive is always opened exclusively by a single process, so instead
|
||||
of the OVERLAPPED structure, we just keep track of the pointer to the
|
||||
OVERLAPPED structure in the application's fhandler. */
|
||||
LPOVERLAPPED ov;
|
||||
struct status_flags
|
||||
|
@ -4175,10 +4175,6 @@ gethostid (void)
|
||||
{
|
||||
/* Fetch the globally unique MachineGuid value from
|
||||
HKLM/Software/Microsoft/Cryptography and hash it. */
|
||||
|
||||
/* Caution: sizeof long might become > 4 when we go 64 bit, but gethostid
|
||||
is supposed to return a 32 bit value, despite the return type long.
|
||||
That's why hostid is *not* long here. */
|
||||
int32_t hostid = 0x40291372; /* Choose a nice start value */
|
||||
WCHAR wguid[38];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user