From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 393E63858281; Tue, 17 Jan 2023 19:15:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 393E63858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673982929; bh=MfZtXgGhBfEdhoUJ3zFGRzDZwJCEeIYbKcAHc0c4AfQ=; h=From:To:Subject:Date:From; b=B17QdiQ1a46aE8gJ8rJpvcyUJfHBeCUH4D7dRd8fl8g+cAH8v6d9CmdiUcyGqHhGZ jnFm9g1N7HNYkygNHjNsBjqo/n8eCM717lSzUov6h/oH2cM2m6gHNj1ZZnyNc3Jmww KfwoXkEuigyq8SkbdHiil2Ham3r9X2bsTXoe+g3M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_4-branch] Cygwin: Move shared regions, rename PINFO... to MYSELF_REGION_ADDRESS X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/cygwin-3_4-branch X-Git-Oldrev: 62f11a5a57043404719cc5d81f3d2ebbf8142b29 X-Git-Newrev: 1e854c18e5b2261e159671f6c09de593f3618ca2 Message-Id: <20230117191529.393E63858281@sourceware.org> Date: Tue, 17 Jan 2023 19:15:29 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D1e854c18e5b= 2261e159671f6c09de593f3618ca2 commit 1e854c18e5b2261e159671f6c09de593f3618ca2 Author: Corinna Vinschen AuthorDate: Mon Jan 16 22:20:48 2023 +0100 Commit: Corinna Vinschen CommitDate: Tue Jan 17 19:49:39 2023 +0100 Cygwin: Move shared regions, rename PINFO... to MYSELF_REGION_ADDRESS =20 Fix comments accordingly. =20 This is in preparation for a change in open_shared, handling shared regions more cleanly. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/local_includes/memory_layout.h | 18 ++++++++++-------- winsup/cygwin/mm/shared.cc | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/local_includes/memory_layout.h b/winsup/cygwin/l= ocal_includes/memory_layout.h index 83ccf8f65817..a3a0cae70fb0 100644 --- a/winsup/cygwin/local_includes/memory_layout.h +++ b/winsup/cygwin/local_includes/memory_layout.h @@ -16,14 +16,16 @@ details. */ dynamicbase is accidentally not set in the PE/COFF header of the DLL. */ #define CYGWIN_DLL_ADDRESS 0x180040000UL =20 -/* New with ASLR: We need a fixed place for the global shared memory areas. - Prior to ASLR, the addresses were relative to the address the Cygwin DLL - was loaded to. */ -#define SHARED_REGIONS_ADDRESS_LOW 0x1f0000000UL -#define CYGWIN_REGION_ADDRESS 0x1f0000000UL -#define USER_REGION_ADDRESS 0x1f2000000UL -#define PINFO_REGION_ADDRESS 0x1f4000000UL -#define SHARED_CONSOLE_REGION_ADDRESS 0x1f6000000UL +/* Default addresses of required standard shared regions (Cygwin shared, + user shared, myself, shared console). */ +#define CYGWIN_REGION_ADDRESS 0x1a0000000UL +#define USER_REGION_ADDRESS 0x1a1000000UL +#define MYSELF_REGION_ADDRESS 0x1a2000000UL +#define SHARED_CONSOLE_REGION_ADDRESS 0x1a3000000UL + +/* Area for non-fixed-address Cygwin-specific shared memory regions. Fall= back + for standard shared regions if the can't load at their default address.= */ +#define SHARED_REGIONS_ADDRESS_LOW 0x1a4000000UL #define SHARED_REGIONS_ADDRESS_HIGH 0x200000000UL =20 /* Rebased DLLs are located in this 16 Gigs arena. Will be kept for diff --git a/winsup/cygwin/mm/shared.cc b/winsup/cygwin/mm/shared.cc index 351d314af01b..aa9997c7569c 100644 --- a/winsup/cygwin/mm/shared.cc +++ b/winsup/cygwin/mm/shared.cc @@ -118,7 +118,7 @@ static uintptr_t region_address[] =3D { CYGWIN_REGION_ADDRESS, /* SH_CYGWIN_SHARED */ USER_REGION_ADDRESS, /* SH_USER_SHARED */ - PINFO_REGION_ADDRESS, /* SH_MYSELF */ + MYSELF_REGION_ADDRESS, /* SH_MYSELF */ SHARED_CONSOLE_REGION_ADDRESS, /* SH_SHARED_CONSOLE */ 0 };