Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rel2 #232

Merged
merged 5 commits into from
Oct 29, 2023
Merged

Rel2 #232

merged 5 commits into from
Oct 29, 2023

Conversation

stsp
Copy link
Member

@stsp stsp commented Oct 29, 2023

segelf relocations support.

This patch uses --emit-relocs to provide the relocations,
and then looks for R_386_16+RELC symbols.
We used to have DOS_PSP=cs, but now we have ELF headers in DOS space.
And as we use tiny model, cs:0 inevitably points to them.
To not overwrite them with PSP, move DOS_PSP var to kernel.asm and
initialize it with PGROUP.
This patch makes PGROUP no longer equal to other segments, so this
needs a proper segelf support. This can't be done in a master branch
where we relocate by a hard-coded value only (0x60).
So this patch shows a clear advantage of the segelf scheme usage.

Note that even the part of this patch, eg aligning PSP section to
0x100, cannot be back-ported to master because there we store PSP
at cs:0 regardless of the linker script, and overwrite whatever
is there. And there are the ELF headers now, since commit 95432f8.
Which probably shouldn't have been back-ported to master as a start.
As we now support arbitrary load offsets, load to DOS starting
from .ptext section, rather than from what PT_LOAD says to load.
@stsp stsp merged commit 01699a8 into master Oct 29, 2023
2 checks passed
@stsp stsp deleted the rel2 branch October 29, 2023 13:18
@stsp
Copy link
Member Author

stsp commented Oct 29, 2023

I disabled the arm64 build
on LP for now. fdpp should
be ported to arm once again. :(

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.

1 participant