Skip to content

6.1 Fedora/Asahi Linux ld :warning swift-collections-manifest has a LOAD segment with RWX permissions #80521

Open
@zaneenders

Description

@zaneenders

Description

Not sure if this is a bug in Asahi or the Fedora builds but I get the following output when building a fresh Package that imports NIOCore

Temp swift build                         
Fetching https://github.com/apple/swift-system.git from cache
Fetching https://github.com/apple/swift-atomics.git from cache
Fetching https://github.com/apple/swift-collections.git from cache
Fetching https://github.com/apple/swift-nio.git from cache
Fetched https://github.com/apple/swift-system.git from cache (0.00s)
Fetched https://github.com/apple/swift-atomics.git from cache (0.00s)
Fetched https://github.com/apple/swift-collections.git from cache (0.01s)
Fetched https://github.com/apple/swift-nio.git from cache (0.05s)
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.1.4
Creating working copy for https://github.com/apple/swift-nio.git
Working copy of https://github.com/apple/swift-nio.git resolved at 2.81.0
Creating working copy for https://github.com/apple/swift-atomics.git
Working copy of https://github.com/apple/swift-atomics.git resolved at 1.2.0
Creating working copy for https://github.com/apple/swift-system.git
Working copy of https://github.com/apple/swift-system.git resolved at 1.4.2
Building for debugging...
/usr/bin/ld: warning: /home/zane/Downloads/Temp/.build/aarch64-unknown-linux-gnu/debug/Temp has a LOAD segment with RWX permissions
[312/312] Linking Temp
Build complete! (13.26s)Temp 

Reproduction

// swift-tools-version: 6.1
import PackageDescription

let package = Package(
    name: "Temp",
    dependencies: [
        .package(
            url: "https://github.com/apple/swift-nio.git",
            from: "2.77.0")
    ],
    targets: [
        .executableTarget(
            name: "Temp",
            dependencies: [
                .product(name: "NIO", package: "swift-nio")
            ])
    ]
)
// main.swift
import NIOCore

print("Hello, world!")

Expected behavior

I don't think ld should be printing out warnings about Load segments being executable. At least it doesn't on Ubuntu or MacOS.

/usr/bin/ld: warning: /home/zane/Downloads/Temp/.build/aarch64-unknown-linux-gnu/debug/Temp has a LOAD segment with RWX permissions

Environment

Swift version 6.1 (swift-6.1-RELEASE)
Target: aarch64-unknown-linux-gnu

➜ Temp cat /etc/os-release
NAME="Fedora Linux Asahi Remix"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora-asahi-remix
ID_LIKE=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux Asahi Remix 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora-asahi-remix:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedora-asahi-remix.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://discussion.fedoraproject.org/c/neighbors/asahi/asahi-help/94"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    LinuxPlatform: Linuxarm64Architecture: arm64 (aarch64) — any 64-bit ARMbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions