Lines Matching refs:ELF
13 from vndk_definition_tool import Elf_Sym, ELF
44 self.assertEqual(ELF.ELFCLASS32, ELF.get_ei_class_from_name('32'))
45 self.assertEqual(ELF.ELFCLASS64, ELF.get_ei_class_from_name('64'))
48 self.assertEqual(ELF.ELFDATA2LSB,
49 ELF.get_ei_data_from_name('Little-Endian'))
50 self.assertEqual(ELF.ELFDATA2MSB,
51 ELF.get_ei_data_from_name('Big-Endian'))
54 self.assertEqual(0, ELF.get_e_machine_from_name('EM_NONE'))
55 self.assertEqual(3, ELF.get_e_machine_from_name('EM_386'))
56 self.assertEqual(8, ELF.get_e_machine_from_name('EM_MIPS'))
57 self.assertEqual(40, ELF.get_e_machine_from_name('EM_ARM'))
58 self.assertEqual(62, ELF.get_e_machine_from_name('EM_X86_64'))
59 self.assertEqual(183, ELF.get_e_machine_from_name('EM_AARCH64'))
62 elf = ELF()
65 elf = ELF(ei_class=ELF.ELFCLASS32, ei_data=ELF.ELFDATA2LSB,
71 self.assertEqual('None', ELF().elf_class_name)
73 elf = ELF(ELF.ELFCLASS32)
78 elf = ELF(ELF.ELFCLASS64)
84 self.assertEqual('None', ELF().elf_data_name)
86 ELF(None, ELF.ELFDATA2LSB).elf_data_name)
88 ELF(None, ELF.ELFDATA2MSB).elf_data_name)
91 self.assertEqual('EM_NONE', ELF(e_machine=0).elf_machine_name)
92 self.assertEqual('EM_386', ELF(e_machine=3).elf_machine_name)
93 self.assertEqual('EM_MIPS', ELF(e_machine=8).elf_machine_name)
94 self.assertEqual('EM_ARM', ELF(e_machine=40).elf_machine_name)
95 self.assertEqual('EM_X86_64', ELF(e_machine=62).elf_machine_name)
96 self.assertEqual('EM_AARCH64', ELF(e_machine=183).elf_machine_name)
99 elf = ELF()
103 elf = ELF(None, None, 0, ['a'], ['b'])
108 elf = ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB, 183, ['a'], ['b'],
154 self.assertEqual(ELF.ELFCLASS64, res.ei_class)
155 self.assertEqual(ELF.ELFDATA2LSB, res.ei_data)
171 check_parse_dump_file_result(ELF.load_dumps(data))
179 check_parse_dump_file_result(ELF.load_dump(f.name))
184 elf = ELF(dt_needed=['libnativehelper.so'])
187 elf = ELF(dt_needed=['libandroid_runtime.so'])
190 elf = ELF(dt_needed=['libc.so'])
194 elf = ELF(imported_symbols={'JNI_CreateJavaVM'})
197 elf = ELF(exported_symbols={'JNI_CreateJavaVM'})
200 elf = ELF(imported_symbols={'Java_com_example_Example_test'})
203 elf = ELF(exported_symbols={'Java_com_example_Example_test'})
206 elf = ELF(imported_symbols={'printf'})
209 elf = ELF(exported_symbols={'printf'})