Skip to content

Makefile: Link final elf with -z notext for newer binutils - #288

Open
runlevel5 wants to merge 1 commit into
open-power:masterfrom
runlevel5:link-z-notext-newer-binutils
Open

Makefile: Link final elf with -z notext for newer binutils#288
runlevel5 wants to merge 1 commit into
open-power:masterfrom
runlevel5:link-z-notext-newer-binutils

Conversation

@runlevel5

Copy link
Copy Markdown

skiboot is a self-relocating PIE: it links with -pie and processes its own relocations at boot, so it legitimately contains text relocations.

binutils >= 2.39 promotes "read-only segment has dynamic relocations" from a warning to a hard error by default, which breaks the final link:

ld: error: read-only segment has dynamic relocations

This is hit with binutils 2.46 (Fedora 44, Ubuntu 26.04) and 2.44 (Debian 13). Pass -z notext to allow the text relocations, guarded by try-ldflag to match the existing --no-warn-rwx-segments handling added in 3d634a1.

skiboot is a self-relocating PIE: it links with -pie and processes its
own relocations at boot, so it legitimately contains text relocations.

binutils >= 2.39 promotes "read-only segment has dynamic relocations"
from a warning to a hard error by default, breaking the final link:

 ld: error: read-only segment has dynamic relocations

This is hit with binutils 2.46 (Fedora 44, Ubuntu 26.04) and 2.44
(Debian 13). Pass -z notext to allow the text relocations, guarded by
try-ldflag to match the existing --no-warn-rwx-segments handling.

Signed-off-by: Trung Lê <8@tle.id.au>
@runlevel5

Copy link
Copy Markdown
Author

@rarbab the PR is ready for review

@rarbab

rarbab commented Jun 2, 2026

Copy link
Copy Markdown
Member

LGTM, but if you don't mind, please send this patch to the mailing list, per skiboot's old-school development process. I doubt anyone will comment, but that's where the audience is. 🙂

@runlevel5

Copy link
Copy Markdown
Author

@rarbab I've sent an email to the mailing list. Btw I also found there is this thing https://patchwork.ozlabs.org/project/skiboot/list/, is it the new process for submitting patch?

@sharkcz

sharkcz commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

I will review/comment it :-)

@rarbab

rarbab commented Jun 3, 2026

Copy link
Copy Markdown
Member

I also found there is this thing https://patchwork.ozlabs.org/project/skiboot/list/, is it the new process for submitting patch?

Sorry, no. Patchwork is a tool to view and manage patches, but it can't be used to submit a patch. To submit, you just send mail to the list.

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