Lines Matching refs:ELF
8 from vndk_definition_tool import Elf_Sym, ELF
46 self.assertEqual(ELF.ELFCLASS32, ELF.get_ei_class_from_name('32'))
47 self.assertEqual(ELF.ELFCLASS64, ELF.get_ei_class_from_name('64'))
51 self.assertEqual(ELF.ELFDATA2LSB,
52 ELF.get_ei_data_from_name('Little-Endian'))
53 self.assertEqual(ELF.ELFDATA2MSB,
54 ELF.get_ei_data_from_name('Big-Endian'))
58 self.assertEqual(0, ELF.get_e_machine_from_name('EM_NONE'))
59 self.assertEqual(3, ELF.get_e_machine_from_name('EM_386'))
60 self.assertEqual(8, ELF.get_e_machine_from_name('EM_MIPS'))
61 self.assertEqual(40, ELF.get_e_machine_from_name('EM_ARM'))
62 self.assertEqual(62, ELF.get_e_machine_from_name('EM_X86_64'))
63 self.assertEqual(183, ELF.get_e_machine_from_name('EM_AARCH64'))
67 elf = ELF()
70 elf = ELF(ei_class=ELF.ELFCLASS32, ei_data=ELF.ELFDATA2LSB,
77 self.assertEqual('None', ELF().elf_class_name)
79 elf = ELF(ELF.ELFCLASS32)
84 elf = ELF(ELF.ELFCLASS64)
91 self.assertEqual('None', ELF().elf_data_name)
93 ELF(None, ELF.ELFDATA2LSB).elf_data_name)
95 ELF(None, ELF.ELFDATA2MSB).elf_data_name)
99 self.assertEqual('EM_NONE', ELF(e_machine=0).elf_machine_name)
100 self.assertEqual('EM_386', ELF(e_machine=3).elf_machine_name)
101 self.assertEqual('EM_MIPS', ELF(e_machine=8).elf_machine_name)
102 self.assertEqual('EM_ARM', ELF(e_machine=40).elf_machine_name)
103 self.assertEqual('EM_X86_64', ELF(e_machine=62).elf_machine_name)
104 self.assertEqual('EM_AARCH64', ELF(e_machine=183).elf_machine_name)
108 elf = ELF()
112 elf = ELF(None, None, 0, ['a'], ['b'])
118 elf = ELF(ELF.ELFCLASS32, ELF.ELFDATA2LSB, 183, ['a'], ['b'],
165 self.assertEqual(ELF.ELFCLASS64, res.ei_class)
166 self.assertEqual(ELF.ELFDATA2LSB, res.ei_data)
182 check_parse_dump_file_result(ELF.load_dumps(data))
190 check_parse_dump_file_result(ELF.load_dump(f.name))
195 elf = ELF(dt_needed=['libnativehelper.so'])
198 elf = ELF(dt_needed=['libandroid_runtime.so'])
201 elf = ELF(dt_needed=['libc.so'])
206 elf = ELF(imported_symbols={'JNI_CreateJavaVM'})
209 elf = ELF(exported_symbols={'JNI_CreateJavaVM'})
212 elf = ELF(imported_symbols={'Java_com_example_Example_test'})
215 elf = ELF(exported_symbols={'Java_com_example_Example_test'})
218 elf = ELF(imported_symbols={'printf'})
221 elf = ELF(exported_symbols={'printf'})