Import cstr and segment functions into macho

This commit is contained in:
Sam Carlton 2021-02-02 20:22:58 -06:00
parent b6d2316313
commit 362e5bcc6a
3 changed files with 87 additions and 80 deletions

View file

@ -8,3 +8,5 @@ var Cstr = function Cstr(buf) {
} }
return cstr; return cstr;
}; };
export default Cstr

View file

@ -11,6 +11,8 @@ import { MachoHeader64, MachoHeader } from './macho.header.js'
import { LOAD_COMMAND_TYPE, LoadCommand } from './macho.loadcommand.js' import { LOAD_COMMAND_TYPE, LoadCommand } from './macho.loadcommand.js'
import { CPU_TYPE, CPU_SUB_TYPE } from './macho.cpu.js' import { CPU_TYPE, CPU_SUB_TYPE } from './macho.cpu.js'
import { FILE_FLAGS, FILE_TYPE } from './macho.file.js' import { FILE_FLAGS, FILE_TYPE } from './macho.file.js'
import Cstr from './macho.cstr.js'
import { SegmentCommand } from './macho.segment.js'
function default_callback(buffer) { function default_callback(buffer) {
console.log('Received ' + buffer.byteLength / (1024 * 1024) + ' MB'); console.log('Received ' + buffer.byteLength / (1024 * 1024) + ' MB');

View file

@ -68,3 +68,6 @@ var SegmentCommand64 = function SegmentCommand64(cmd, cmdsize, segname, vmaddr,
return JSON.stringify(this); return JSON.stringify(this);
}; };
}; };
export { SG_FLAGS, SG_FLAG, SEGMENT, SegmentCommand, SegmentCommand64 }