+2005-01-01 Christopher Faylor <cgf@timesys.com>
+
+ * shared.cc (open_shared): Don't attempt VirtualAlloc magic if first
+ attempt to map memory fails.
+
2004-12-30 Christopher Faylor <cgf@timesys.com>
* devices.cc (device::isfs): Return true for the logical case of
void *shared;
void *addr;
- if (!wincap.needs_memory_protection ())
+ if (!wincap.needs_memory_protection () && offsets[0])
addr = NULL;
else
{
if (wincap.is_winnt ())
system_printf ("relocating shared object %s(%d) from %p to %p on Windows NT", name, n, addr, shared);
#endif
+ offsets[0] = NULL;
}
if (!shared)
api_fatal ("MapViewOfFileEx '%s'(%p), %E. Terminating.", name, shared_h);
- if (m == SH_CYGWIN_SHARED && wincap.needs_memory_protection ())
+ if (m == SH_CYGWIN_SHARED && offsets[0] && wincap.needs_memory_protection ())
{
unsigned delta = (char *) shared - offsets[0];
offsets[0] = (char *) shared;