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

Plan #1

Open
3 of 19 tasks
xarantolus opened this issue Sep 13, 2022 · 0 comments
Open
3 of 19 tasks

Plan #1

xarantolus opened this issue Sep 13, 2022 · 0 comments

Comments

@xarantolus
Copy link
Owner

xarantolus commented Sep 13, 2022

This is a tracking issue for all stuff I plan on working on. If you want to implement something, feel free to do so :)

  • Add syscalls to trace
  • Build with no_std to maybe reduce output size (currently 1.1MB, which isn't great), some work in 2cc8479
  • Actually emulate programs (run ELF binaries by just providing the binary, nothing more). This already works for binaries that are written in x86 assembly and then compiled with relevant compiler flags (mentioned on the test site), however binaries with libc don't work; the entrypoint logic seems broken)
    • The brokenness seems to come from interaction with not yet relocated memory sections
  • Add some way to stop/abort a running binary, e.g. on the test site the uppercase example just runs forever. This stop mechanism should also work while a syscall is in progress
    • It is kind of already implemented on the demo site, but honestly not great
  • Better access to information
    • Reading/Writing flags (preferably with an easy-to-use API, but also a more raw way of just getting RFLAGS), expose constants
    • Maybe get access to memory area API
    • Maybe expose instruction decoding API
  • Refactor to make test binary build/link time faster
  • Make the locally built binary work correctly, currently it can't read input and fails with the args example program
  • Make stack allocation in stack setup functions take exactly the requested amount of memory instead of some value close to it
  • Implement more pre-defined syscalls (candidates: mprotect, nanosleep)
  • Expose constants
  • Initialize auxiliary vector, correctly
  • Implement some very basic CPUID instruction
  • Load PT_GNU_EH_FRAME
  • Convenience function for printing stack
    • Just do a hexdump
  • Allow some kind of text input translation, e.g. like my wasm x86 assembler, maybe as a crate feature and separate package
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

No branches or pull requests

1 participant