-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macaw-aarch32: add test for binary containing empty section
- Loading branch information
1 parent
6c5cc25
commit cac9c3a
Showing
4 changed files
with
29 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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
R { funcs = [ (0x100d8, [(0x100d8,8), (0x100e0, 8)]), | ||
(0x100e8, [(0x100e8,32)]) | ||
] | ||
, ignoreBlocks = [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// test-empty-section.c | ||
// test for issue #302 (https://github.com/GaloisInc/macaw/issues/302) | ||
// results in a binary with an empty section when built as follows: | ||
// | ||
// arm-linux-gnueabi-gcc -nostartfiles -O2 -static test-empty-section.c -o test-empty-section-a32.exe | ||
// | ||
// | ||
#include <stdint.h> | ||
|
||
uint64_t x = 0; | ||
|
||
int __attribute__((noinline)) test_strd() { | ||
x = 42; | ||
return x == 42; | ||
} | ||
|
||
int main() { | ||
test_strd(); | ||
return 0; | ||
} |