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

Create an tbf parsing crate #1

Closed
alexandruradovici opened this issue Nov 14, 2022 · 6 comments
Closed

Create an tbf parsing crate #1

alexandruradovici opened this issue Nov 14, 2022 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@alexandruradovici
Copy link

For now, the tbf parsing source is in the header.rs file. The purpose of this is to make the tbf parse its own carte, so that it can be used in other projects.

@mihai-negru
Copy link

Should the tbf parsing crate be found under the src folder or to the root folder?

@alexandruradovici
Copy link
Author

No, it should be its own crate in the root folder.

@alexandruradovici alexandruradovici linked a pull request Dec 9, 2022 that will close this issue
alexandruradovici pushed a commit that referenced this issue Jan 4, 2023
@mihai-negru
Copy link

mihai-negru commented Jan 23, 2023

Hi, I accidentally closed the last pull request, by synchronizing my master branch with the upstreams master branch, and I will work on using tbf types from the tock/tock repository instead of redefining them and will make another pull request (didn't know that it will close the pull request, sorry)

@mihai-negru
Copy link

As far I could see is that in elf2tab the new function is called to create an empty TbfHeader and then it starts to fill it with data, I looked at the parse_tbf_header from tock-tbf and seems to to the same thing, however it needs to have a header slice of u8 representing the base for the TbfHeader, so I thought it would be a good start to first populate the header slice (to modify the elf2tab code in order to create the header slice) and then to send it to the parse_tbf_header in order to create the TbfHeader, what is your suggestion regarding this starting point? Thanks for the answer

@alexandruradovici
Copy link
Author

I think there are two parts here:

  1. the creation and modification of a TBF header - that implies using the std library and collections
  2. the parsing of a TBF header in readonly mode, that only allow the interpretation of the header, not its modification

The two parts should share data structures, some of them marked as #[no-std].

@alexandruradovici
Copy link
Author

Moved issue to UPB-CS-OpenSourceUpstream/tbf-parser#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants