Skip to content

sections-divergences: the 7.3 differences from the decompressor, main, wakeup.c and fs/super.c - #125

Merged
tamnd merged 1 commit into
mainfrom
sections-7.3
Oct 21, 2026
Merged

tamnd merged 1 commit into
mainfrom
sections-7.3

Conversation

@tamnd

@tamnd tamnd commented Oct 21, 2026

Copy link
Copy Markdown
Owner

This change explains the section and table differences that the 7.3 compare on #110 reported with no reason. I read each one against the source and against a test compile on server3.

What changes

  • .note.gnu.property only in the gcc objects of arch/x86/boot/compressed and drivers/firmware/efi/libstub. Ubuntu's gcc turns on -fcf-protection when no -fcf-protection is given, and writes the IBT and SHSTK note. These directories set their own flags without -fcf-protection. Debian's gcc and rucc write no note then. I checked this with gcc and rucc on a file with no flags. The EFI stub removes the note from each object.
  • .text.startup only in the gcc objects of arch/x86/boot/main.o and arch/x86/realmode/rm/wakemain.o. gcc puts main there when it optimizes. Both linker scripts collect .text.*.
  • The __bug_table site for WARN_ON(!ws) in wakeup_source_remove. Its only caller calls it inside if (ws), so rucc is correct to remove it.
  • .altinstructions, .altinstr_replacement and .discard.annotate_data only in the gcc fs/super.o when CONFIG_BUG is off. rucc deletes the popcnt alternative of hweight32 because no one reads its result. gcc keeps it because of the ASM_CALL_CONSTRAINT output on the stack pointer. The result is the same here, but in general this is a difference from GCC, so I opened Keep an asm that writes a global register variable, as gcc does with ASM_CALL_CONSTRAINT rucc#3764 with a reduction.

Check

cargo test -p rk passes, and the file parses. The kernel workflow on this PR runs the compare again on 7.3.

Part of #109.

@tamnd tamnd added kind/chore Upkeep, dependencies and tidying area/rk The rk command line row/x64 x86-64 priority/p2 Should land in the current milestone labels Oct 21, 2026
@tamnd
tamnd merged commit 736f05d into main Oct 21, 2026
4 checks passed
@tamnd
tamnd deleted the sections-7.3 branch October 21, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rk The rk command line kind/chore Upkeep, dependencies and tidying priority/p2 Should land in the current milestone row/x64 x86-64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant