Skip to content

Linker warning when compiling with GCC 12 #1029

@ooxi

Description

@ooxi

When compiling a minimal example with GCC 12.2 I'm getting the following linker warning:

[1/5] Performing build step for 'ELF2UF2Build'
ninja: no work to do.
[5/5] Linking CXX executable hello_world.elf
/usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: warning: hello_world.elf has a LOAD segment with RWX permissions
/usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: warning: hello_world.elf has a LOAD segment with RWX permissions

This is confusing for novices. Unfortunately my linker script foo is not sufficient enough to propose a fix.

GCC 12.2 is shipped by Fedora 36, the current stable release. You can see the linker warning with full compile output in my GitHub Actions build

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions