From: Jason A. Donenfeld Date: Sun, 8 Nov 2020 02:09:42 +0000 (+0100) Subject: cmd/link: deal with ADDR32NB relocations the same way as ADDR32 on arm X-Git-Tag: go1.16beta1~22 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=48dfa2b2dca43c6dc80d7e1d1c605e2918fad3af;p=gostls13.git cmd/link: deal with ADDR32NB relocations the same way as ADDR32 on arm As far as I can tell, the addend is the same for both of these, and in this context we don't really care about setting or unsetting the thumb selection bit, so just treat these the same way. Change-Id: I3756c027239f77778c32b317733df9ac92272580 Reviewed-on: https://go-review.googlesource.com/c/go/+/268238 Reviewed-by: Cherry Zhang Trust: Jason A. Donenfeld --- diff --git a/src/cmd/link/internal/loadpe/ldpe.go b/src/cmd/link/internal/loadpe/ldpe.go index 7677278ec5..c72965dddc 100644 --- a/src/cmd/link/internal/loadpe/ldpe.go +++ b/src/cmd/link/internal/loadpe/ldpe.go @@ -308,7 +308,7 @@ func Load(l *loader.Loader, arch *sys.Arch, localSymVersion int, input *bio.Read rAdd = int64(int32(binary.LittleEndian.Uint32(sectdata[rsect][rOff:]))) - case IMAGE_REL_ARM_ADDR32: + case IMAGE_REL_ARM_ADDR32, IMAGE_REL_ARM_ADDR32NB: rType = objabi.R_ADDR rAdd = int64(int32(binary.LittleEndian.Uint32(sectdata[rsect][rOff:])))