-
Notifications
You must be signed in to change notification settings - Fork 564
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
more mypy v1.1.1 fixes #1423
Merged
Merged
more mypy v1.1.1 fixes #1423
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d230780
pep8
williballenthin 59332c2
tests: fixtures: add paths for new ELF test file
williballenthin 3f5d9c7
elf: add type hints and Symbol dataclass
williballenthin d2fc740
result document: mypy
williballenthin 30c1421
main: better separate logic for deserializing result/freeze/other
williballenthin 28e85aa
main: mypy
williballenthin 4312840
elf: remove old debugging code
williballenthin b09e3e6
wip: result document: deserialize into capa object instances
williballenthin bc8df09
result document: more deserialization
williballenthin a64a889
tests: add another test demonstrating rd format output
williballenthin e240372
result document: document subscope/match handling
williballenthin 5e0d617
elf: parse associated strtab for symtab
williballenthin efcc2e0
elf: remove old print statement
williballenthin d4b83e3
ci: pyinstaller: update to use ubuntu 20.04 for building linux
williballenthin 545e198
ci: bump more ubuntu images
williballenthin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yelhamer FYI, ELF files may have mutiple strtabs, so we need to read the correct one using the
sh_link
field of the symtab section header field, rather than just taking the last one found. i learned this from here: https://stackoverflow.com/a/69888949/87207i noticed the bug because the ELF sample bf7a9c8bdfa6d47e01ad2b056264acc3fd90cf43fe0ed8deec93ab46b47d76cb has extra string tables that didn't line up with what the symtab entries expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note i've also done a little refactoring to make use of existing code to parse section headers and their associated data. no major changes to your logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed using sh_link to get strtab's index, that's pretty nifty!
I also really like the refactoring you did, specifically, adding symtab() to the ELF section, I think that's much better than my original solution (having it inside the guess_os_from_symtab() function).
Thank you!