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

Initial support for OpenBSD 7.5 #573

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

shym
Copy link
Contributor

@shym shym commented Apr 12, 2024

This PR is a WIP as tests are failing but it makes at least the build succeed on OpenBSD 7.5.
Credits to @dustanddreams for identifying the breaking changes.

All the tests errors I see now are:

ld.lld: error: relocation refers to a symbol in a discarded section: __retguard_546
>>> defined in /home/build/solo5/toolchain/bin/../lib/x86_64-solo5-none-static/solo5_hvt.o

or similar with solo5_stub.o.

I think I’ve read somewhere similar errors being tackled previously. Any idea for a fix?

@adamsteen
Copy link
Contributor

I did the initial port, I expect the ‘ret_guard’ protections need to be turned off in the linker or compiler, I don’t have the time to look too deeply atm, but will have a read over the next week to see what I find

@adamsteen
Copy link
Contributor

adamsteen commented Apr 13, 2024

Just read clang-local

clang includes the retguard security feature on amd64, arm64, mips64, powerpc and powerpc64. This feature can be disabled with the -fno-ret-protector or -fno-stack-protector options.

Should be enough to add -fno-ret-protector to ‘configure.sh’, oops look like we already do https://github.com/Solo5/solo5/blob/master/configure.sh#L438

sorry not sure, seems like something in the chain does not have -fno-ret-protector, that’s where I would look

or is the linker script (object definition thing) dropping the section OpenBSD needs? Sorry I am not more help

@shym shym mentioned this pull request Apr 18, 2024
6 tasks
@hannesm
Copy link
Contributor

hannesm commented Oct 9, 2024

What is the status of this PR? Also, is there any update with OpenBSD 7.6 now released?

@shym
Copy link
Contributor Author

shym commented Oct 9, 2024

I had no time to make any progress on that work.
(I imagine the changes in that PR will be required anyway even if they are not enough.)

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