MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / SegmentCommand

Function SegmentCommand

helpers/macho/macho.segment.js:37–52  ·  view source on GitHub ↗
(type, size, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags)

Source from the content-addressed store, hash-verified

35
36//32-bits segment command
37var SegmentCommand = function SegmentCommand(type, size, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) {
38 this.cmd = type || 0x00000000;
39 this.cmdsize = size || 0x00000000;
40 this.segname = new TextEncoder("utf-8").encode(segname) || new Uint8Array(16);
41 this.vmaddr = vmaddr || 0x00000000;
42 this.vmsize = vmsize || 0x00000000;
43 this.fileoff = fileoff || 0x00000000;
44 this.filesize = filesize || 0x00000000;
45 this.maxprot = maxprot || 0x00000000;
46 this.initprot = initprot || 0x00000000;
47 this.nsects = nsects || 0x00000000;
48 this.flags = flags || 0x00000000;
49 this.toString = function() {
50 return JSON.stringify(this);
51 };
52};
53
54//64-bits segment command
55var SegmentCommand64 = function SegmentCommand64(cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected