1 .text 2 .globl foo 3 .type foo, @function 4foo: 5 addiu $sp,$sp,-32 6 sw $31,($sp) 7 sw $28,4($sp) 8 lui $28,%hi(__GOTT_BASE__) 9 lw $28,%lo(__GOTT_BASE__)($28) 10 lw $28,%half(__GOTT_INDEX__)($28) 11 lw $2,%got(x)($28) 12 lw $3,($2) 13 addiu $3,$3,1 14 sw $3,($2) 15 lw $25,%got(slocal)($gp) 16 jalr $25 17 lw $25,%call16(sglobal)($gp) 18 jalr $25 19 lw $25,%call16(sexternal)($gp) 20 jalr $25 21 lw $31,($sp) 22 lw $28,4($sp) 23 addiu $sp,$sp,32 24 jr $31 25 .size foo, .-foo 26 27 .type slocal, @function 28slocal: 29 jr $31 30 .size slocal, .-slocal 31 32 .globl sglobal 33 .type sglobal, @function 34sglobal: 35 jr $31 36 .size sglobal, .-sglobal 37 38 .comm x,4,4 39 40 .data 41 .type dlocal, @object 42dlocal: 43 .word slocal 44 .word dlocal 45 .size dlocal, .-dlocal 46 47 .globl dglobal 48 .type dglobal, @object 49dglobal: 50 .word dglobal 51 .word dexternal 52 .size dglobal, .-dglobal 53