Skip to content

binutils+patchelf: Upcoming incompatibility that already affects Fedora #362211

@ADKaster

Description

@ADKaster

Describe the bug

Patch bf6d7087de0a7351fd1dfd5f41522a7f4f576180 to binutils, applied to binutils 2.43.50, exposes a bad assumption in patchelf.

Binaries linked with this version of binutils crash when their rpath is modified with patchelf.

Steps To Reproduce

Steps to reproduce the behavior:

Ensure that the BFD linker has the referenced patch applied.

g++ -o hello hello.cpp
./hello
Hello, World!
patchelf --set-rpath '/usr/lib' ./hello # Any path fails
./hello
Segmentation fault (core dumped)

Expected behavior

Non-crashing binaries. The binutils maintainers have stated that they intend to keep this section re-order if possible, as it allows gdb to give more useful information when analyzing core dumps. (And there's not much activity on the patchelf bug tracker 😬 )

Screenshots

N/A

Additional context

https://bugzilla.redhat.com/show_bug.cgi?id=2319341
https://bugzilla.redhat.com/show_bug.cgi?id=2321588
NixOS/patchelf#568
microsoft/vcpkg#41576
LadybirdBrowser/ladybird#2149

Metadata

N/A

Notify maintainers

@Ericson2314 @lovesegfault


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions