[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips |
Date: |
Thu, 22 Sep 2022 11:25:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29592
--- Comment #5 from Nick Clifton <nickc at redhat dot com> ---
(In reply to matoro from comment #3)
> The warning itself is correct. In golang, CGO_ENABLED=1 (the default)
> creates a dynamic exe, while CGO_ENABLED=0 produces a static one.
>
> However the -fPIC part is not accurate. Golang has its own assembly
> emitter, it doesn't use gcc or any compiler for codegen. It only uses ld
> for linking.
So possibly the golang assembler is generating the wrong relocations when
CGO_ENABLED is set to 0. (ie it should be producing relocations suitable for
generating static executables, but instead it is generating relocations
suitable for dynamic executables).
(In reply to matoro from comment #4)
> OK, just tested, removing --enable-warn-execstack does resolve the problem.
> But that also confirms that toggling that flag is not purely informational,
> it has an effect on the linker behavior and causes previously-working
> scenarios to stop working.
Right - we definitely need to investigate this. Is there any chance that you
can create a small test case that reproduces the problem ? Ideally one that
just involves the linker and does not need a Go toolchain.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/29592] New: [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, sam at gentoo dot org, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, nickc at redhat dot com, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/21
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips,
nickc at redhat dot com <=
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/22
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, nickc at redhat dot com, 2022/09/26
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, matoro_bugzilla_glibc at matoro dot tk, 2022/09/26
- [Bug ld/29592] [2.39 Regression][bisected] Exec stack warning causes go programs with cgo to fail to link on mips, nickc at redhat dot com, 2022/09/27