1 ! Copyright (C) 2010 Erik Charlebois.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors alien io io.streams.string kernel literals macho
4 multiline sequences strings system tools.test ;
7 STRING: validation-output
8 0000000100000f1c __stub_helper stub helpers
9 0000000100001040 __program_vars _pvars
10 0000000100001068 __data _NXArgc
11 0000000100001070 __data _NXArgv
12 0000000100001080 __data ___progname
13 0000000100000000 __mh_execute_header
14 0000000100001078 __data _environ
15 0000000100000ef8 __text _main
16 0000000100000ebc __text start
17 0000000000000000 ___gxx_personality_v0
18 0000000000000000 _exit
19 0000000000000000 _printf
20 0000000000000000 dyld_stub_binder
25 { $ validation-output }
26 [ [ "resource:extra/macho/a.macho" macho-nm ] with-string-writer ]
30 "resource:extra/macho/a2.macho" [
31 >c-ptr fat-binary-members first data>> >c-ptr macho-header 64-bit?
36 ! Throw an exception if the struct is not defined/handled
38 { } [ vm-path dylib-exports drop ] unit-test