Skip to content

Commit f216391

Browse files
committed
go-patches: force PIE mode on arm
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1 parent 483bdfa commit f216391

11 files changed

Lines changed: 54 additions & 10 deletions

go-patches/0001-cmd-link-recognize-arm-header-of-PE-objects.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From fde4a13eb5eba28ac546b10752b38a80f389cc5a Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Sun, 8 Nov 2020 02:48:09 +0100
4-
Subject: [PATCH 01/10] cmd/link: recognize arm header of PE objects
4+
Subject: [PATCH 01/11] cmd/link: recognize arm header of PE objects
55

66
The linker recognizes headers for 386 and amd64 PE objects, but not arm
77
objects. This is easily overlooked, since its the same as the 386 header

go-patches/0002-cmd-link-deal-with-ADDR32NB-relocations-the-same-way.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From a0a59fc25f4d8aef3c7bce38c84f04c504745f0e Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Sun, 8 Nov 2020 03:09:42 +0100
4-
Subject: [PATCH 02/10] cmd/link: deal with ADDR32NB relocations the same way
4+
Subject: [PATCH 02/11] cmd/link: deal with ADDR32NB relocations the same way
55
as ADDR32 on arm
66

77
As far as I can tell, the addend is the same for both of these, and in

go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From e8142ab5e3b3a513683a8e3792e6197644547981 Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Sun, 8 Nov 2020 03:20:36 +0100
4-
Subject: [PATCH 03/10] cmd/link: ignore SEH marking on PE objects
4+
Subject: [PATCH 03/11] cmd/link: ignore SEH marking on PE objects
55

66
Microsoft's linker looks at whether all input objects have an empty
77
section called @feat.00. If all of them do, then it enables SEH;

go-patches/0004-cmd-link-do-not-mark-resource-section-as-writable.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 8255e115f325a58fd4746741f9f35c2f54d70d63 Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Sun, 8 Nov 2020 11:11:27 +0100
4-
Subject: [PATCH 04/10] cmd/link: do not mark resource section as writable
4+
Subject: [PATCH 04/11] cmd/link: do not mark resource section as writable
55

66
Resources are immutable, and all other linkers set this section to be
77
read-only and not read-write. Fix this oversight by rmoving the writable

go-patches/0005-cmd-link-handle-grouped-resource-sections.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 5d5d74f35dd3375cda8ef2ba8257547aad107ecb Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Sun, 8 Nov 2020 11:57:42 +0100
4-
Subject: [PATCH 05/10] cmd/link: handle grouped resource sections
4+
Subject: [PATCH 05/11] cmd/link: handle grouped resource sections
55

66
The Go PE linker does not support enough generalized PE logic to
77
properly handle .rsrc sections gracefully. Instead a few things are

go-patches/0006-Revert-release-branch.go1.15-runtime-detect-services.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From e6b4c1b3beb4f843ed40abead27c8132d29a0db8 Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Fri, 11 Sep 2020 13:04:11 +0200
4-
Subject: [PATCH 06/10] Revert "[release-branch.go1.15] runtime: detect
4+
Subject: [PATCH 06/11] Revert "[release-branch.go1.15] runtime: detect
55
services in signal handler"
66

77
This reverts commit b1253d24e159129c778377c3a2a0bde15904a417.

go-patches/0007-runtime-do-not-explicitly-exit-on-ctrl-handler.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From af4eb34d920c0c727041ebf587e0de608068ed59 Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Tue, 14 Jul 2020 01:41:03 -0600
4-
Subject: [PATCH 07/10] runtime: do not explicitly exit on ctrl handler
4+
Subject: [PATCH 07/11] runtime: do not explicitly exit on ctrl handler
55

66
The default ctrl+c handler should process exits in situations where it
77
makes sense, like console apps, but not in situations where it doesn't,

go-patches/0008-runtime-allow-callback-functions-with-up-to-8-argume.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 5a7c808cbacb8c0477395c5656c1eba3ef38cd6e Mon Sep 17 00:00:00 2001
22
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
33
Date: Tue, 10 Nov 2020 21:42:36 +0100
4-
Subject: [PATCH 08/10] runtime: allow callback functions with up to 8
4+
Subject: [PATCH 08/11] runtime: allow callback functions with up to 8
55
arguments on windows/arm
66

77
Previously, windows/arm programs would abort when trying to use

go-patches/0009-runtime-use-CreateWaitableTimerEx-to-implement-uslee.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 1a163f2e676e4664f2db3f614eb4168bda9d4fd8 Mon Sep 17 00:00:00 2001
22
From: Alex Brainman <alex.brainman@gmail.com>
33
Date: Sun, 19 Jul 2020 16:06:48 +1000
4-
Subject: [PATCH 09/10] runtime: use CreateWaitableTimerEx to implement usleep
4+
Subject: [PATCH 09/11] runtime: use CreateWaitableTimerEx to implement usleep
55
MIME-Version: 1.0
66
Content-Type: text/plain; charset=UTF-8
77
Content-Transfer-Encoding: 8bit

go-patches/0010-runtime-allow-for-usleep2HighRes-to-run-without-TLS-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 1edac4879e2d4a36d339353c151cb7b9871e135f Mon Sep 17 00:00:00 2001
22
From: Alex Brainman <alex.brainman@gmail.com>
33
Date: Sat, 21 Nov 2020 14:56:26 +1100
4-
Subject: [PATCH 10/10] runtime: allow for usleep2HighRes to run without TLS
4+
Subject: [PATCH 10/11] runtime: allow for usleep2HighRes to run without TLS
55
setup
66
MIME-Version: 1.0
77
Content-Type: text/plain; charset=UTF-8

0 commit comments

Comments
 (0)