-
Notifications
You must be signed in to change notification settings - Fork 33
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
RFC: bin2cfetbl.py tool (ELF and Mach-O support) #34
Conversation
Thanks @stanislaw. One note on the CLA, I just checked on this side and the only personal CLA that has been received is specifically for the OSAL repository (18.370.1). The rest of the framework (cFE, PSP, ci_lab, sample_app, sample_lib, sch_lab, to_lab, cFS-GroundSystem, elf2cfetbl, and tblCRCtool) is covered by CLA form 18.128-1
Could you provide the 18.128.1 form that covers this contribution? Note we are hoping in the next round to consolidate to one form to avoid this complexity, but at this point we are stuck managing two. |
I am pretty sure I have signed and sent the NASA/CFE 18.128-1 ~15 min ago. The email should be
No worries. I am used to processes. Happy to participate in testing and improvement. |
@stanislaw Excellent! I checked with our folks yesterday (they don't give me direct access to that email account), so my information is old. Thanks! |
This requires some CCB discussion. This strikes me as a complete alternative to As far as I can tell there should be nothing preventing you from creating another github repo to contain this alternative table creation tool. It would also be a good fit for putting into the list of external tools and resources to raise awareness of it. It should be fairly easy for any interested user to pull in this tool instead of |
@jphickey thanks for the answer. It is very easy to create a separate repo to make it available as an external tool. I could also make this repository a submodule of that new repository and write integration tests that make sure that the Python tool always produces the same output compared to the Do you also consider the macOS OSAL port to be something you would prefer to keep externally? I am asking because there is a dependency between osal/posix-mac and this tool if you want to run CFS on macOS. Has there been any decision made about the macOS OSAL? Thank you. |
There are multiple facets to this question... While it is true that a MacOS developer whom is also running table-based apps would (possibly) need both of these, they really address different issues and and can be approached differently. The reason I propose putting this into a separate repo is because it really is an outright replacement of the You are more than welcome to keep your complete MacOS OSAL changes in your local fork as long as you need them, but it will probably be a more gradual, itemized process to merge these into the OSAL. Basically on the OSAL side, I would like to identify the specific areas where the current POSIX implementation is depending on features that other non Linux/Glibc environments may not consistently provide, and address them each independently with focused change sets. This would benefit not just MacOS, but also various BSD, Cygwin, and WSL use cases which have come up from time to time. Note that IIRC the Cygwin environment (and maybe WSL too?) uses a COFF binary format, so it also doesn't work with |
I fully agree that it makes sense to create a separate repo. I will create it within 1-2 days.
I very much understand and share your point of view (general maintenance perspective). On my end though I need to have cFS running on Linux and macOS rather soon so I will keep working on my fork for now but also I want to extract some easy things from my macOS PR starting from this one: nasa/osal#363.
Just a thought: I just checked LIEF again. They seem to not have COFF support but otherwise they seem to be rather advanced in the general support of ELF/Mach-O/PE so maybe people who need COFF could contribute its support there directly. |
Just FYI: I am still keeping it as a direct fork of |
Excellent! Would you be interested in adding it to https://github.com/nasa/cFS/blob/master/README.md under "Other Tools" to raise awareness of this new tool? If so please submit a pull request on the cFS repo. |
Describe the contribution
This work complements the work I did for CFS/OSAL in nasa/osal#352. In order to run CFS on macOS the
elf2cfetbl
tool has to be updated to support Mach-O.This work is based on the following comment by @jphickey :
I have decided to rewrite the tool in Python and made it to support both ELF and Mach-O files.
I would like to get feedback about the approach: if the direction is approved I would to complete the implementation and add all missing test cases.
This is a small plan of what is done and what still has to be done:
.tbl
file (little endian binaries).tbl
file (little endian binaries)elf2cfetbl
elf2cfetbl
does (example:Original Source File Modification Time:
)sample_table.tbl
andsch_lab_table
which are built by CFS by default.Testing performed
pip install lief lit filecheck
Run the
bin2cfetbl-tests-integration
CMake target. The LIT tests should pass.Expected behavior changes
System(s) tested on
Additional context
None.
Third party code
lief
, Apache License Version 2.0lit
, Apache License v2.0 with LLVM ExceptionsFileCheck.py
, Apache License Version 2.0Contributor Info - All information REQUIRED for consideration of pull request
Stanislav Pankevich. Personal.
The individual CLA has been signed and sent to the GSFC-SoftwareRelease.