Skip to content

fix: disable SFrame support by default#1871

Merged
mati865 merged 9 commits into
wild-linker:mainfrom
mati865:push-xlwxkovtwskt
Apr 29, 2026
Merged

fix: disable SFrame support by default#1871
mati865 merged 9 commits into
wild-linker:mainfrom
mati865:push-xlwxkovtwskt

Conversation

@mati865

@mati865 mati865 commented Apr 28, 2026

Copy link
Copy Markdown
Member

SFrame support is so hopelessly broken everywhere right now that making it experimental is the best course of action.
With this PR .sframe section is emitted if present in the inputs regardless of sections GC, although it will be broken unless --wild-experimental-sframe is passed and system's as outputs SFrame version 2.
I made an attempt to never emit it unless explicitly enabled fix: Emit SFrame section only when enabled but it doesn't seem worth the hassle.

CC #1576

@mati865

mati865 commented Apr 28, 2026

Copy link
Copy Markdown
Member Author

Great, there is only CI platform able to test current implementation, and it becomes EoL in 2 months.

@mati865 mati865 force-pushed the push-xlwxkovtwskt branch from 22abfd5 to 8a1e349 Compare April 29, 2026 11:49
@mati865 mati865 marked this pull request as ready for review April 29, 2026 13:48
Comment thread libwild/src/elf_writer.rs
@@ -308,7 +307,7 @@ fn fill_padding(mut section_buffers: OutputSectionMap<&mut [u8]>) {
}

fn write_sframe_section(sframe_buffer: &mut [u8], layout: &ElfLayout) -> Result {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how difficult it would be, but could we avoid loading those sections altogether? Similar to how we handle the debug info section with --strip-debug?

@mati865 mati865 Apr 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted that in 8a1e349 (this PR).

There is no consistency at all in all of this.

Older ld.bfd versions were handling (merging and sorting) SFrame sections just fine but removed them if --gc-sections was enabled. Recent versions preserve SFrame sections with sections GC enabled.

LLD doesn't merge them, and retains one of SFrame sections unless sections GC is enabled (standard ELF behaviour for unknown sections).

Before and with this PR Wild retains one of SFrame sections regardless of sections GC. If I make it retain SFrame sections only when the experimental flag is passed (basically revert last two reverts) we get CI failures like here https://github.com/wild-linker/wild/actions/runs/25107607314/job/73572763695?pr=1871. Although we could ignore SFrame entirely in linker-diff, if you prefer that way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, given the time and experiments you made, let's go with the currently suggested approach in this PR.
The change is pretty minimal.

@marxin marxin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on it, it's really annoying the feature in such an inconsistent shape.

@mati865 mati865 merged commit 7f5cf00 into wild-linker:main Apr 29, 2026
24 checks passed
@mati865 mati865 deleted the push-xlwxkovtwskt branch April 29, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants