aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/inspect_elf.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/inspect_elf.rs b/tests/inspect_elf.rs
index 654c632..d3c5ae1 100644
--- a/tests/inspect_elf.rs
+++ b/tests/inspect_elf.rs
@@ -266,6 +266,12 @@ fn imxrt1010evk() {
binary.fcb().unwrap()
);
assert_eq!(binary.flexram_config().unwrap(), 0b11_10_0101);
+ assert_eq!(binary.symbol_value("__sitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__sdtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__edtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__socram").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eocram").unwrap(), 0);
let ivt = binary.ivt().unwrap();
assert_eq!(ivt.magic_header, 0x402000D1);
@@ -380,6 +386,13 @@ fn imxrt1010evk_ram() {
let binary = ImxrtBinary::new(&elf, &contents);
+ assert_eq!(binary.symbol_value("__sitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__sdtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__edtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__socram").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eocram").unwrap(), 0);
+
let stack = binary.section(".stack").unwrap();
assert_eq!(
Section {
@@ -495,6 +508,12 @@ fn baseline_teensy4(
binary.flexram_config().unwrap(),
0b11111111_101010101010101010101010
);
+ assert_eq!(binary.symbol_value("__sitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__sdtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__edtcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__socram").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eocram").unwrap(), 0);
let ivt = binary.ivt().unwrap();
assert_eq!(ivt.magic_header, 0x402000D1);
@@ -735,6 +754,12 @@ fn imxrt1170evk_cm7() {
binary.fcb().unwrap()
);
assert_eq!(binary.flexram_config().unwrap(), 0xFFAAFFAA);
+ assert_eq!(binary.symbol_value("__sitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eitcm").unwrap(), 0x4_0000);
+ assert_eq!(binary.symbol_value("__sdtcm").unwrap(), 0x2000_0000);
+ assert_eq!(binary.symbol_value("__edtcm").unwrap(), 0x2004_0000);
+ assert_eq!(binary.symbol_value("__socram").unwrap(), 0x2024_0000);
+ assert_eq!(binary.symbol_value("__eocram").unwrap(), 0x2034_0000);
let ivt = binary.ivt().unwrap();
assert_eq!(ivt.magic_header, 0x402000D1);
@@ -856,6 +881,13 @@ fn imxrt1170evk_cm7_nonboot() {
assert!(binary.fcb().is_err());
assert_eq!(binary.flexram_config().unwrap(), 0xFFAAFFAA);
+ assert_eq!(binary.symbol_value("__sitcm").unwrap(), 0);
+ assert_eq!(binary.symbol_value("__eitcm").unwrap(), 0x4_0000);
+ assert_eq!(binary.symbol_value("__sdtcm").unwrap(), 0x2000_0000);
+ assert_eq!(binary.symbol_value("__edtcm").unwrap(), 0x2004_0000);
+ assert_eq!(binary.symbol_value("__socram").unwrap(), 0x2024_0000);
+ assert_eq!(binary.symbol_value("__eocram").unwrap(), 0x2034_0000);
+
assert!(
binary.ivt().is_err(),
"Non boot image still contains boot IVT"