1 #-------------------------------------------------------------------------------
4 # Eli Bendersky (eliben@gmail.com)
5 # This code is in the public domain
6 #-------------------------------------------------------------------------------
8 import unittest2
as unittest
13 from utils
import setup_syspath
; setup_syspath()
14 from elftools
.elf
.elffile
import ELFFile
16 class TestARMSupport(unittest
.TestCase
):
18 with
open(os
.path
.join('test', 'testfiles',
19 'simple_gcc.elf.arm'), 'rb') as f
:
21 self
.assertEqual(elf
.get_machine_arch(), 'ARM')
23 # Check some other properties of this ELF file derived from readelf
24 self
.assertEqual(elf
['e_entry'], 0x8018)
25 self
.assertEqual(elf
.num_sections(), 14)
26 self
.assertEqual(elf
.num_segments(), 2)
28 if __name__
== '__main__':