MCPcopy Index your code
hub / github.com/apache/tvm / verify_elf

Function verify_elf

tests/python/codegen/test_target_codegen_cross_llvm.py:57–63  ·  view source on GitHub ↗
(path, e_machine)

Source from the content-addressed store, hash-verified

55 nn = 1024
56
57 def verify_elf(path, e_machine):
58 with open(path, "rb") as fi:
59 arr = fi.read(20)
60 assert struct.unpack("ccc", arr[1:4]) == (b"E", b"L", b"F")
61 endian = struct.unpack("b", arr[0x5:0x6])[0]
62 endian = "<" if endian == 1 else ">"
63 assert struct.unpack(endian + "h", arr[0x12:0x14])[0] == e_machine
64
65 def build_arm():
66 target = {"kind": "llvm", "mtriple": "armv7-none-linux-gnueabihf"}

Callers 1

build_armFunction · 0.85

Calls 2

unpackMethod · 0.80
readMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…