bug-binutils
[Top][All Lists]
Advanced

[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: Tue, 27 Sep 2022 08:09:32 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29592

--- Comment #9 from Nick Clifton <nickc at redhat dot com> ---
(In reply to matoro from comment #8)

Sorry - what I meant was that the problem is not with the code that implements
the execstack warning, but rather the fact that when CGO_ENABLED=1 is used, the
GO compiler is changing its behaviour and trying to link a dynamic executable
rather than a static one.  

As part of this change different startup files are selected, and in particular
/usr/lib64/Scrt1.o is being linked in, rather than /usr/lib64/crt1.o.  This is
a problem because /usr/lib64/Scrt1.o is marked as requiring an executable stack
and so the warning is triggered.  But - this warning has not caused all the
other linking problems.  It is the fact that the linker is now being asked to
create a dynamic executable from object files that were built for static
linkage that causes the problems.

So the real question is *why* does CGO_ENABLED=1 change the type of executable
that is being created ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]