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

Error: in LibOS mode, static app runs with segment fault. #211

Open
chyyuu opened this issue Aug 14, 2021 · 2 comments
Open

Error: in LibOS mode, static app runs with segment fault. #211

chyyuu opened this issue Aug 14, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@chyyuu
Copy link
Member

chyyuu commented Aug 14, 2021

e.g.

chyyuu:zCore$ cargo run --release -p linux-loader -- /libc-test/src/functional/argv-static.exe
Finished release [optimized] target(s) in 0.03s
Running target/release/linux-loader /libc-test/src/functional/argv-static.exe
段错误 (核心已转储)
chyyuu:zCore$

I also notice:

scripts/libc-tests.py

L22~24:
# ignore static linked tests
if path.endswith('-static.exe'):
continue

These codes mean LibOS mode zCore didn't support static linked tests?

@chyyuu chyyuu added the bug Something isn't working label Aug 14, 2021
@wangrunji0408
Copy link
Member

Yes. LibOS can only run dynamic linked programs because we have to modify libc.so (syscall -> function call).
Static linked programs have syscall instructions in their binary files.

@chyyuu
Copy link
Member Author

chyyuu commented Aug 14, 2021

Thank you.
I guess:
If we build static apps with modified libc .a (syscall --> function call), then these static apps should work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants