Add Soong support and fix various issues - #16
Open
huku- wants to merge 1 commit into
Open
Conversation
* Added Soong blueprints to allow using btfparse within the AOSP source tree. * Use size_t instead of uint64_t for file offsets to avoid compilation errors on 32-bit architectures (Soong builds both primary and secondary ABIs). Using off_t would be the proper solution, but it introduces several compilation errors. Since only positive offsets are used, size_t is sufficient. Most offsets are uint32_t and are truncated before being promoted anyway. * Add missing return statement in BTFHeaderGenerator::setTypeName().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made the following changes to
btfparseto make it compile within the AOSP source tree:Added Soong blueprints.
Use
size_tinstead ofuint64_tfor file offsets to avoid compilation errors on 32-bit architectures (Soong builds both primary and secondary ABIs).Using
off_twould be the proper solution, but it introduces several compilation errors. Since only positive offsets are used,size_tis sufficient. Most offsets areuint32_tand are truncated before being promoted anyway.Add missing return statement in
BTFHeaderGenerator::setTypeName().With these modifications,
dump-btfcompiles fine and can be executed on an Android device.However, more updates are required to make it recognize additional BTF kinds. Will work on this and submit a different PR.