wul*_*rry 7 c linux gcc ld windows-subsystem-for-linux
我分别在 wsl 和我主要使用的操作系统 archLinux 中的 ubuntu20.04 上编译了相同的项目。在 wsl 上,一切正常,而在 archlinux 上,会显示如下错误消息:
/usr/bin/ld: warning: trap.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Run Code Online (Sandbox Code Playgroud)
这似乎是由链接器ld引起的错误,它在我的 Linux 操作系统上的版本消息是:
GNU ld (GNU Binutils) 2.39
Copyright (C) 2022 Free Software Foundation, Inc.
Run Code Online (Sandbox Code Playgroud)
我的 wsl 上的它是:
GNU ld (GNU Binutils for Ubuntu) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
Run Code Online (Sandbox Code Playgroud)
在 arch 上,gcc 的版本是12.1.1,而在 wsl 上是 gcc 9.3.0
是新旧版本差异造成的吗?我该如何修复它?