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

Lua shell doesn't run on Fedora 40 #1323

Open
nyh opened this issue Jul 3, 2024 · 0 comments · May be fixed by #1345
Open

Lua shell doesn't run on Fedora 40 #1323

nyh opened this issue Jul 3, 2024 · 0 comments · May be fixed by #1345

Comments

@nyh
Copy link
Contributor

nyh commented Jul 3, 2024

After #1320 is fixed, OSv builds on Fedora 40 and my pet image "rogue",

scripts/build image=rogue
scripts/run.py

works as expected.

However, the default build of "scripts/build" - including an HTTP server and a Lua shell - builds fine but fails to run:

$ scripts/run.py
OSv v0.57.0-167-g501acdd7
eth0: 192.168.122.15
Booted up in 364.55 ms
Cmdline: /cli
Aborted

[backtrace]
0x00000000402227ec <???+1075980268>
0x0000000040401fec <osv::handle_mmap_fault(unsigned long, int, exception_frame*)+28>
0x00000000402c298b <mmu::vm_fault(unsigned long, exception_frame*)+363>
0x000000004031e0e3 <page_fault+147>
0x000000004031ce12 <???+1077005842>
0x00000000402da6a6 <elf::program::init_library(int, char**)+358>
0x000000004022edbe <osv::application::main()+62>
0x00000000403c66f8 <???+1077700344>
0x00000000403fdb25 <???+1077926693>
0x0000000040395027 <thread_main_c+39>
0x000000004031dfe1 <???+1077010401>
wkozaczuk added a commit to wkozaczuk/osv that referenced this issue Feb 8, 2025
As this article
https://maskray.me/blog/2021-10-31-relative-relocations-and-relr
explains, the relocations of new type RELR help significantly compress
the traditional RELA ones.

More specifically, the new RELR section encodes information about
relocations that merely need adding the base of the ELF object
to a relative offset. The even entry encodes the location of the
1st symbol to be relocated. And the odd one encodes information
about the subsequent symbols using a bitmap. For details look
at the comments in the code.

The implementation is loosely based on the Musl one - https://git.musl-libc.org/cgit/musl/commit/?id=d32dadd60efb9d3b255351a3b532f8e4c3dd0db1

Fixes cloudius-systems#1323

Signed-off-by: Waldemar Kozaczuk <[email protected]>
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 a pull request may close this issue.

1 participant