Makefile: Link final elf with -z notext for newer binutils - #288
Open
runlevel5 wants to merge 1 commit into
Open
Makefile: Link final elf with -z notext for newer binutils#288runlevel5 wants to merge 1 commit into
runlevel5 wants to merge 1 commit into
Conversation
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>
Author
|
@rarbab the PR is ready for review |
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. 🙂 |
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? |
Contributor
|
I will review/comment it :-) |
Member
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
skiboot is a self-relocating PIE: it links with
-pieand 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:
This is hit with binutils 2.46 (Fedora 44, Ubuntu 26.04) and 2.44 (Debian 13). Pass
-z notextto allow the text relocations, guarded bytry-ldflagto match the existing--no-warn-rwx-segmentshandling added in 3d634a1.