1 .text 2 .globl foo 3 .type foo, %function 4foo: 5 save %sp, -104, %sp 6 sethi %hi(__GOTT_BASE__), %l7 7 ld [%l7+%lo(__GOTT_BASE__)],%l7 8 ld [%l7+%lo(__GOTT_INDEX__)],%l7 9 sethi %hi(x), %g1 10 or %g1, %lo(x), %g1 11 ld [%l7+%g1], %g1 12 ld [%g1], %g2 13 add %g2, 1, %g2 14 15 call slocal, 0 16 st %g2, [%g1] 17 18 call sexternal, 0 19 nop 20 21 call sexternal, 0 22 nop 23 24 ret 25 restore 26 .size foo, .-foo 27 28 .type slocal, %function 29slocal: 30 retl 31 nop 32 .size slocal, .-slocal 33 34 .globl sglobal 35 .type sglobal, %function 36sglobal: 37 retl 38 nop 39 .size sglobal, .-sglobal 40 41 .data 42 .4byte slocal 43 44 .comm x,4,4 45