Package: golang-1.9 / 1.9.2-3

Metadata

Package Version Patches format
golang-1.9 1.9.2-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0002 reproducible BUILD_PATH_PREFIX_MAP.patch | (download)

src/cmd/go/internal/work/build.go | 5 4 + 1 - 0 !
src/cmd/link/internal/ld/buildpathprefix.go | 56 56 + 0 - 0 !
src/cmd/link/internal/ld/dwarf.go | 4 2 + 2 - 0 !
src/cmd/link/internal/ld/pcln.go | 4 2 + 2 - 0 !
4 files changed, 64 insertions(+), 5 deletions(-)

 make builds reproducible by honoring build_path_prefix_map
0003 Do not use SP as index reg.patch | (download)

src/cmd/compile/internal/x86/387.go | 6 6 + 0 - 0 !
test/fixedbugs/issue22429.go | 18 18 + 0 - 0 !
2 files changed, 24 insertions(+)

 cmd/compile: make sure not to use sp as an index register
 ...because that's an illegal addressing mode.
Reviewed-on: https://go-review.googlesource.com/73551
Bug-Upstream: https://github.com/golang/go/issues/22429

0004 cmd dist use buildmode pie for pie testing.patch | (download)

src/cmd/dist/test.go | 52 14 + 38 - 0 !
1 file changed, 14 insertions(+), 38 deletions(-)

 [patch] cmd/dist: use -buildmode=pie for pie testing

Some tests in misc/cgo/test are run with various options including
'-linkmode=external "-extldflags=-pie"'. On ppc64x passing -pie to
the external linker with code that was not compiled as position
independent is incorrect. This works by luck in many cases but is
not guaranteed to work. I suspect it is an issue on other targets
as well.

This will now run the tests using -buildmode=pie for the platforms
that support that buildmode option.

Fixes #21954

0005 runtime use buildmode pie in testCgoPprofPIE instead.patch | (download)

src/runtime/crash_cgo_test.go | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] runtime: use -buildmode=pie in testcgopprofpie  instead of
 -extldflags=-pie

Errors occur in runtime test testCgoPprofPIE when the test
is built by passing -pie to the external linker with code
that was not built as PIC. This occurs on ppc64le because
non-PIC is the default, and fails only on newer distros
where the address range used for programs is high enough
to cause relocation overflow. This test should be built
with -buildmode=pie since that correctly generates PIC
with -pie.

Related issues are #21954 and #22126.

Updates #22459

0006 misc cgo testcarchive use no pie where needed.patch | (download)

misc/cgo/testcarchive/carchive_test.go | 20 19 + 1 - 0 !
1 file changed, 19 insertions(+), 1 deletion(-)

 [patch] misc/cgo/testcarchive: use -no-pie where needed

Starting in gcc 6, -pie is passed to the linker by default
on some platforms, including ppc64le. If the objects
being linked are not built for -pie then in some cases the
executable could be in error. To avoid that problem, -no-pie
should be used with gcc to override the default -pie option
and generate a correct executable that can be run without error.

Fixes #22126