Source/Packages

Compiler.ELF

packages/compiler/src/Compiler/ELF.alpha

317 lines63 declarations12.9 KiBSHA-256 f1c85b457831

def · lines 210–220

fixedZeroELFHeaderSparseLargeFor

Full file
210def fixedZeroELFHeaderSparseLargeFor =
211  (lambda unrestricted machine : Byte .
212    (lambda unrestricted machineCode : Bytes .
213      (let unrestricted fileSize =
214        (naturalAdd (byte-to-nat (byte 120)) (naturalAdd (bytes-length machineCode) (bytes-length (elfPagePadding machineCode))))
215      in
216        (bytes-append
217          (elfHeaderPrefixFor machine)
218          (bytes-append
219            (elfModelWord64Bytes (modelWord64FromNaturalTruncated fileSize))
220            (bytes-append (elfLoadSizeAtLeast4M fileSize) elfHeaderAlign))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.