Skip to content

Instantly share code, notes, and snippets.

@qwzybug
Created March 9, 2009 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwzybug/76397 to your computer and use it in GitHub Desktop.
Save qwzybug/76397 to your computer and use it in GitHub Desktop.
Glaukopis-Athena:Desktop d$ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -S -o ben.arm -arch arm -I/usr/include ben.c
In file included from /usr/include/sys/_types.h:33,
from /usr/include/_types.h:27,
from /usr/include/stdio.h:64,
from ben.c:1:
/usr/include/machine/_types.h:36:24: error: arm/_types.h: No such file or directory
In file included from /usr/include/_types.h:27,
from /usr/include/stdio.h:64,
from ben.c:1:
/usr/include/sys/_types.h:94: error: syntax error before ‘__darwin_blkcnt_t’
/usr/include/sys/_types.h:94: warning: data definition has no type or storage class
/usr/include/sys/_types.h:95: error: syntax error before ‘__darwin_blksize_t’
/usr/include/sys/_types.h:95: warning: data definition has no type or storage class
/usr/include/sys/_types.h:96: error: syntax error before ‘__darwin_dev_t’
/usr/include/sys/_types.h:96: warning: data definition has no type or storage class
/usr/include/sys/_types.h:99: error: syntax error before ‘__darwin_gid_t’
/usr/include/sys/_types.h:99: warning: data definition has no type or storage class
/usr/include/sys/_types.h:100: error: syntax error before ‘__darwin_id_t’
/usr/include/sys/_types.h:100: warning: data definition has no type or storage class
/usr/include/sys/_types.h:101: error: syntax error before ‘__darwin_ino64_t’
/usr/include/sys/_types.h:101: warning: data definition has no type or storage class
/usr/include/sys/_types.h:105: error: syntax error before ‘__darwin_ino_t’
/usr/include/sys/_types.h:105: warning: data definition has no type or storage class
/usr/include/sys/_types.h:107: error: syntax error before ‘__darwin_mach_port_name_t’
/usr/include/sys/_types.h:107: warning: data definition has no type or storage class
/usr/include/sys/_types.h:108: error: syntax error before ‘__darwin_mach_port_t’
/usr/include/sys/_types.h:108: warning: data definition has no type or storage class
/usr/include/sys/_types.h:109: error: syntax error before ‘__darwin_mode_t’
/usr/include/sys/_types.h:109: warning: data definition has no type or storage class
/usr/include/sys/_types.h:110: error: syntax error before ‘__darwin_off_t’
/usr/include/sys/_types.h:110: warning: data definition has no type or storage class
/usr/include/sys/_types.h:111: error: syntax error before ‘__darwin_pid_t’
/usr/include/sys/_types.h:111: warning: data definition has no type or storage class
/usr/include/sys/_types.h:131: error: syntax error before ‘__darwin_sigset_t’
/usr/include/sys/_types.h:131: warning: data definition has no type or storage class
/usr/include/sys/_types.h:132: error: syntax error before ‘__darwin_suseconds_t’
/usr/include/sys/_types.h:132: warning: data definition has no type or storage class
/usr/include/sys/_types.h:133: error: syntax error before ‘__darwin_uid_t’
/usr/include/sys/_types.h:133: warning: data definition has no type or storage class
/usr/include/sys/_types.h:134: error: syntax error before ‘__darwin_useconds_t’
/usr/include/sys/_types.h:134: warning: data definition has no type or storage class
In file included from ben.c:1:
/usr/include/stdio.h:70: error: syntax error before ‘va_list’
/usr/include/stdio.h:70: warning: data definition has no type or storage class
/usr/include/stdio.h:75: error: syntax error before ‘off_t’
/usr/include/stdio.h:75: warning: data definition has no type or storage class
/usr/include/stdio.h:80: error: syntax error before ‘size_t’
/usr/include/stdio.h:80: warning: data definition has no type or storage class
/usr/include/stdio.h:87: error: syntax error before ‘fpos_t’
/usr/include/stdio.h:87: warning: data definition has no type or storage class
/usr/include/stdio.h:145: error: syntax error before ‘fpos_t’
/usr/include/stdio.h:145: warning: no semicolon at end of struct or union
/usr/include/stdio.h:162: error: syntax error before ‘_offset’
/usr/include/stdio.h:162: warning: data definition has no type or storage class
/usr/include/stdio.h:163: warning: data definition has no type or storage class
/usr/include/stdio.h:167: error: syntax error before ‘*’ token
/usr/include/stdio.h:167: warning: data definition has no type or storage class
/usr/include/stdio.h:168: error: syntax error before ‘*’ token
/usr/include/stdio.h:168: warning: data definition has no type or storage class
/usr/include/stdio.h:169: error: syntax error before ‘*’ token
/usr/include/stdio.h:169: warning: data definition has no type or storage class
/usr/include/stdio.h:249: error: syntax error before ‘*’ token
/usr/include/stdio.h:250: error: syntax error before ‘*’ token
/usr/include/stdio.h:251: error: syntax error before ‘*’ token
/usr/include/stdio.h:252: error: syntax error before ‘*’ token
/usr/include/stdio.h:253: error: syntax error before ‘*’ token
/usr/include/stdio.h:254: error: syntax error before ‘*’ token
/usr/include/stdio.h:255: error: syntax error before ‘*’ token
/usr/include/stdio.h:256: error: syntax error before ‘FILE’
/usr/include/stdio.h:257: error: syntax error before ‘*’ token
/usr/include/stdio.h:257: warning: data definition has no type or storage class
/usr/include/stdio.h:258: error: syntax error before ‘*’ token
/usr/include/stdio.h:258: warning: conflicting types for built-in function ‘fprintf’
/usr/include/stdio.h:259: error: syntax error before ‘FILE’
/usr/include/stdio.h:260: error: syntax error before ‘FILE’
/usr/include/stdio.h:261: error: syntax error before ‘fread’
/usr/include/stdio.h:261: error: syntax error before ‘size_t’
/usr/include/stdio.h:261: warning: data definition has no type or storage class
/usr/include/stdio.h:262: error: syntax error before ‘*’ token
/usr/include/stdio.h:263: error: syntax error before ‘FILE’
/usr/include/stdio.h:263: warning: data definition has no type or storage class
/usr/include/stdio.h:264: error: syntax error before ‘*’ token
/usr/include/stdio.h:264: warning: conflicting types for built-in function ‘fscanf’
/usr/include/stdio.h:265: error: syntax error before ‘*’ token
/usr/include/stdio.h:266: error: syntax error before ‘*’ token
/usr/include/stdio.h:267: error: syntax error before ‘*’ token
/usr/include/stdio.h:268: error: syntax error before ‘fwrite’
/usr/include/stdio.h:268: error: syntax error before ‘size_t’
/usr/include/stdio.h:268: warning: conflicting types for built-in function ‘fwrite’
/usr/include/stdio.h:268: warning: data definition has no type or storage class
/usr/include/stdio.h:269: error: syntax error before ‘*’ token
/usr/include/stdio.h:278: error: syntax error before ‘FILE’
/usr/include/stdio.h:283: error: syntax error before ‘*’ token
/usr/include/stdio.h:285: error: syntax error before ‘*’ token
/usr/include/stdio.h:286: error: syntax error before ‘*’ token
/usr/include/stdio.h:289: error: syntax error before ‘*’ token
/usr/include/stdio.h:289: warning: data definition has no type or storage class
/usr/include/stdio.h:291: error: syntax error before ‘FILE’
/usr/include/stdio.h:292: error: syntax error before ‘*’ token
/usr/include/stdio.h:293: error: syntax error before ‘va_list’
/usr/include/stdio.h:294: error: syntax error before ‘va_list’
/usr/include/stdio.h:297: error: syntax error before ‘va_list’
/usr/include/stdio.h:312: error: syntax error before ‘*’ token
/usr/include/stdio.h:312: warning: data definition has no type or storage class
/usr/include/stdio.h:314: error: syntax error before ‘*’ token
/usr/include/stdio.h:316: error: syntax error before ‘*’ token
/usr/include/stdio.h:317: error: syntax error before ‘*’ token
/usr/include/stdio.h:321: error: syntax error before ‘*’ token
/usr/include/stdio.h:323: error: syntax error before ‘*’ token
/usr/include/stdio.h:324: error: syntax error before ‘ftello’
/usr/include/stdio.h:324: error: syntax error before ‘*’ token
/usr/include/stdio.h:324: warning: data definition has no type or storage class
/usr/include/stdio.h:325: error: syntax error before ‘*’ token
/usr/include/stdio.h:326: error: syntax error before ‘*’ token
/usr/include/stdio.h:327: error: syntax error before ‘*’ token
/usr/include/stdio.h:330: error: syntax error before ‘*’ token
/usr/include/stdio.h:332: error: syntax error before ‘*’ token
/usr/include/stdio.h:333: error: syntax error before ‘*’ token
/usr/include/stdio.h:333: warning: data definition has no type or storage class
/usr/include/stdio.h:334: error: syntax error before ‘FILE’
/usr/include/stdio.h:337: error: syntax error before ‘FILE’
/usr/include/stdio.h:338: error: syntax error before ‘*’ token
/usr/include/stdio.h:339: error: syntax error before ‘*’ token
/usr/include/stdio.h:341: error: syntax error before ‘size_t’
/usr/include/stdio.h:341: warning: conflicting types for built-in function ‘snprintf’
/usr/include/stdio.h:343: error: syntax error before ‘*’ token
/usr/include/stdio.h:344: error: syntax error before ‘va_list’
/usr/include/stdio.h:345: error: syntax error before ‘size_t’
/usr/include/stdio.h:346: error: syntax error before ‘va_list’
/usr/include/stdio.h:348: error: syntax error before ‘*’ token
/usr/include/stdio.h:348: warning: data definition has no type or storage class
/usr/include/stdio.h:357: error: syntax error before ‘*’ token
/usr/include/stdio.h:360: error: syntax error before ‘fpos_t’
/usr/include/stdio.h:360: error: syntax error before ‘fpos_t’
/usr/include/stdio.h:360: error: ‘funopen’ declared as function returning a function
/usr/include/stdio.h:372: error: syntax error before ‘*’ token
/usr/include/stdio.h:373: error: syntax error before ‘*’ token
/usr/include/stdio.h:374: error: syntax error before ‘FILE’
/usr/include/stdio.h:383: error: syntax error before ‘FILE’
/usr/include/stdio.h: In function ‘__sputc’:
/usr/include/stdio.h:384: error: ‘_p’ undeclared (first use in this function)
/usr/include/stdio.h:384: error: (Each undeclared identifier is reported only once
/usr/include/stdio.h:384: error: for each function it appears in.)
/usr/include/stdio.h:384: error: ‘_c’ undeclared (first use in this function)
Glaukopis-Athena:Desktop d$ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -S -o ben.arm -arch arm ben.cben.c:1:18: error: no include path in which to search for stdio.h
ben.c: In function ‘main’:
ben.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
.section __TEXT,__text,regular,pure_instructions
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.machine ppc7400
.cstring
.align 2
LC0:
.ascii "Ben is a poopie-pants.\0"
.text
.align 2
.globl _main
_main:
mflr r0
stmw r30,-8(r1)
stw r0,8(r1)
stwu r1,-80(r1)
mr r30,r1
bcl 20,31,"L00000000001$pb"
"L00000000001$pb":
mflr r31
stw r3,104(r30)
stw r4,108(r30)
addis r2,r31,ha16(LC0-"L00000000001$pb")
la r3,lo16(LC0-"L00000000001$pb")(r2)
bl L_printf$LDBL128$stub
li r0,0
mr r3,r0
lwz r1,0(r1)
lwz r0,8(r1)
mtlr r0
lmw r30,-8(r1)
blr
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.align 5
L_printf$LDBL128$stub:
.indirect_symbol _printf$LDBL128
mflr r0
bcl 20,31,"L00000000001$spb"
"L00000000001$spb":
mflr r11
addis r11,r11,ha16(L_printf$LDBL128$lazy_ptr-"L00000000001$spb")
mtlr r0
lwzu r12,lo16(L_printf$LDBL128$lazy_ptr-"L00000000001$spb")(r11)
mtctr r12
bctr
.lazy_symbol_pointer
L_printf$LDBL128$lazy_ptr:
.indirect_symbol _printf$LDBL128
.long dyld_stub_binding_helper
.subsections_via_symbols
.cstring
LC0:
.ascii "Ben is a poopie-pants.\0"
.text
.globl _main
_main:
pushl %ebp
movl %esp, %ebp
pushl %ebx
subl $20, %esp
call L3
"L00000000001$pb":
L3:
popl %ebx
leal LC0-"L00000000001$pb"(%ebx), %eax
movl %eax, (%esp)
call L_printf$stub
movl $0, %eax
addl $20, %esp
popl %ebx
leave
ret
.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
L_printf$stub:
.indirect_symbol _printf
hlt ; hlt ; hlt ; hlt ; hlt
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment