-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add elfIsPie to check for position-independent executables
This adds `elfIsPie, a function which returns `True` if the supplied `ElfHeaderInfo` corresponds to a position-independent executable (PIE). The logic for `elfIsPie` is adapted from the source code for the `file` binutils program, which was in turn summarized here: https://unix.stackexchange.com/a/435038 This adds a `directory` dependency to `elf-edit`, as `directory` is used to check file permissions as a fallback. This dependency should be cheap, as `directory` is a GHC boot library. Fixes #46.
- Loading branch information
1 parent
fcda0a5
commit 4cb512e
Showing
3 changed files
with
85 additions
and
0 deletions.
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