aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-12-22 21:20:09 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-04 13:33:10 +0100
commit2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785 (patch)
tree669fd06c641188e5f410576fe8d3020413d66b64 /go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch
parentconf: rename migration to migration_windows (diff)
downloadwireguard-windows-2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785.tar.xz
wireguard-windows-2c9d5a47ca33eb69d40bc81a8c93aa97e18cc785.zip
build: update to go 1.16 beta1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch')
-rw-r--r--go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch b/go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch
deleted file mode 100644
index e5c86f88..00000000
--- a/go-patches/0003-cmd-link-ignore-SEH-marking-on-PE-objects.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From e8142ab5e3b3a513683a8e3792e6197644547981 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Sun, 8 Nov 2020 03:20:36 +0100
-Subject: [PATCH 03/14] cmd/link: ignore SEH marking on PE objects
-
-Microsoft's linker looks at whether all input objects have an empty
-section called @feat.00. If all of them do, then it enables SEH;
-otherwise it doesn't enable that feature. So, since around the Windows
-XP SP2 era, most tools that make PE objects just tack on that section,
-so that it won't gimp Microsoft's linker logic. Go doesn't support SEH,
-so in theory, none of this really matters to us. But actually, if the
-linker tries to ingest an object with @feat.00 -- which are produced by
-LLVM's resource compiler, for example -- it chokes because of the
-IMAGE_SYM_ABSOLUTE section that it doesn't know how to deal with. Since
-@feat.00 is just a marking anyway, skip IMAGE_SYM_ABSOLUTE sections that
-are called @feat.00.
-
-Change-Id: I1d7bfcf6001186c53e2c487c5ac251ca65efefee
----
- src/cmd/link/internal/loadpe/ldpe.go | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cmd/link/internal/loadpe/ldpe.go b/src/cmd/link/internal/loadpe/ldpe.go
-index 5839a6a5f2..b60b84ce9f 100644
---- a/src/cmd/link/internal/loadpe/ldpe.go
-+++ b/src/cmd/link/internal/loadpe/ldpe.go
-@@ -6,6 +6,7 @@
- package loadpe
-
- import (
-+ "bytes"
- "cmd/internal/bio"
- "cmd/internal/objabi"
- "cmd/internal/sys"
-@@ -359,6 +360,9 @@ func Load(l *loader.Loader, arch *sys.Arch, localSymVersion int, input *bio.Read
- if pesym.SectionNumber == IMAGE_SYM_DEBUG {
- continue
- }
-+ if pesym.SectionNumber == IMAGE_SYM_ABSOLUTE && bytes.Equal(pesym.Name[:], []byte("@feat.00")) {
-+ continue
-+ }
- var sect *pe.Section
- if pesym.SectionNumber > 0 {
- sect = f.Sections[pesym.SectionNumber-1]
---
-2.29.2
-