Lines Matching refs:elf
12 from elftools.elf.elffile import ELFFile
13 from elftools.elf.sections import SymbolTableSection
22 def __init__(self, elf, sym): argument
23 self.elf = elf
25 self.data = self.elf.symbol_data(sym)
31 (format, size) = self.elf.native_struct_format
43 def __init__(self, elf, sym): argument
44 super().__init__(elf, sym)
45 self.flags = self._data_native_read(self.elf.ld_consts['_PM_DEVICE_STRUCT_FLAGS_OFFSET'])
49 return self.flags & (1 << self.elf.ld_consts["_PM_DEVICE_FLAG_PD"])
59 def __init__(self, elf, sym): argument
60 super().__init__(elf, sym)
61 format = "<" if self.elf.little_endian else ">"
91 def __init__(self, elf, sym): argument
92 super().__init__(elf, sym)
107 if '_DEVICE_STRUCT_HANDLES_OFFSET' in self.elf.ld_consts:
108 ordinal_offset = self.elf.ld_consts['_DEVICE_STRUCT_HANDLES_OFFSET']
112 if '_DEVICE_STRUCT_PM_OFFSET' in self.elf.ld_consts:
113 pm_offset = self.elf.ld_consts['_DEVICE_STRUCT_PM_OFFSET']
125 self.elf = ELFFile(open(kernel, "rb"))
126 self.relocatable = self.elf['e_type'] == 'ET_REL'
137 return self.elf.little_endian
145 if self.elf.elfclass == 32:
161 section = self.elf.get_section(sym.entry['st_shndx'])
172 for section in self.elf.iter_sections():
180 for section in self.elf.iter_sections():