https://sourceware.org/bugzilla/show_bug.cgi?id=29592
--- Comment #2 from matoro <matoro_bugzilla_glibc at matoro dot tk> --- (In reply to Nick Clifton from comment #1) > (In reply to matoro from comment #0) > Hi Matoro, > > > On mips, since this commit, all linking prints the following warning: > > > > /usr/lib/gcc/mips64-unknown-linux-gnu/12.2.0/../../../../mips64-unknown- > > linux-gnu/bin/ld: warning: > > /usr/lib/gcc/mips64-unknown-linux-gnu/12.2.0/../../../../lib64/Scrt1.o: > > requires executable stack (because the .note.GNU-stack section is > > executable) > > This was supposed to have been fixed by commit > ed1c7ad8e31a2cfca1d8c8c898ee7cde6ae340ca > Do you have that commit in your sources ? > > > > > /var/tmp/portage/dev-lang/go-1.19.1/temp/go-link-3757955373/go.o: in > > function `internal/cpu.Initialize': > > /usr/lib/go/src/internal/cpu/cpu.go:123:(.text+0x14): relocation R_MIPS_26 > > against `a local symbol' cannot be used when making a shared object; > > recompile with -fPIC > > Are you sure that it was that commit which triggered this problem ? > > The commit only added code to generate the new warning messages, it did not > - or at least should not - affect the linking process in any other way. > > Also - is the warning correct ? Is the -fPIC option missing from the > compilation command line ? Or is the linker mistaken when it complains > about attempting to create a shared object ? (IE is it supposed to be > creating a static executable rather than a dynamic executable ?) > > Cheers > Nick Hi Nick, thank you for taking a look at this. I checked and found that the distro (Gentoo) is actually explicitly passing --enable-warn-execstack, so any change to the defaults doesn't help: https://github.com/gentoo/gentoo/blob/master/sys-devel/binutils/binutils-9999.ebuild#L251 I tested at that commit and when --enable-warn-execstack is passed, the issue is still present. What I don't understand is why toggling this warning on or off changes the behavior of the linker - shouldn't it just be a purely informational warning? -- You are receiving this mail because: You are on the CC list for the bug.