1 .file "foo.c" 2 .abiversion 2 3 .section ".toc","aw" 4 .section ".text" 5 .section .rodata 6 .align 3 7 .type kString, @object 8 .size kString, 12 9kString: 10 .string "hello world" 11 .globl kExportedString 12 .align 3 13 .type kExportedString, @object 14 .size kExportedString, 26 15kExportedString: 16 .string "hello world, more visibly" 17 .align 2 18 .type kGiantArray, @object 19 .size kGiantArray, 400000 20kGiantArray: 21 .long 1 22 .long 0 23 .zero 399992 24 .lcomm bss,20,4 25 .type bss, @object 26 .align 3 27.LC1: 28 .string "kString is %p\n" 29 .align 3 30.LC2: 31 .string "kExportedString is %p\n" 32 .align 3 33.LC4: 34 .string "function is %p\n" 35 .align 3 36.LC5: 37 .string "exported_function is %p\n" 38 .align 3 39.LC7: 40 .string "&kString[5] is %p\n" 41 .align 3 42.LC9: 43 .string "&kGiantArray[0x12345] is %p\n" 44 .section ".toc","aw" 45.LC0: 46 .quad stderr 47.LC3: 48 .quad kExportedString 49.LC6: 50 .quad exported_function 51.LC8: 52 .quad kString+5 53.LC10: 54 .quad kGiantArray+298260 55 .section ".text" 56 .align 2 57 .type function, @function 58function: 590: addis 2,12,.TOC.-0b@ha 60 addi 2,2,.TOC.-0b@l 61 .localentry function,.-function 62 mflr 0 63 std 0,16(1) 64 std 31,-8(1) 65 stdu 1,-112(1) 66 mr 31,1 67 addis 10,2,.LC0@toc@ha 68 ld 9,.LC0@toc@l(10) 69 ld 9,0(9) 70 mr 3,9 71 addis 4,2,.LC1@toc@ha 72 addi 4,4,.LC1@toc@l 73 addis 5,2,kString@toc@ha 74 addi 5,5,kString@toc@l 75 bl fprintf 76 nop 77 addis 10,2,.LC0@toc@ha 78 ld 9,.LC0@toc@l(10) 79 ld 9,0(9) 80 mr 3,9 81 addis 4,2,.LC2@toc@ha 82 addi 4,4,.LC2@toc@l 83 addis 9,2,.LC3@toc@ha 84 ld 5,.LC3@toc@l(9) 85 bl fprintf 86 nop 87 addis 10,2,.LC0@toc@ha 88 ld 9,.LC0@toc@l(10) 89 ld 9,0(9) 90 mr 3,9 91 addis 4,2,.LC4@toc@ha 92 addi 4,4,.LC4@toc@l 93 addis 5,2,function@toc@ha 94 addi 5,5,function@toc@l 95 bl fprintf 96 nop 97 addis 10,2,.LC0@toc@ha 98 ld 9,.LC0@toc@l(10) 99 ld 9,0(9) 100 mr 3,9 101 addis 4,2,.LC5@toc@ha 102 addi 4,4,.LC5@toc@l 103 addis 9,2,.LC6@toc@ha 104 ld 5,.LC6@toc@l(9) 105 bl fprintf 106 nop 107 addis 10,2,.LC0@toc@ha 108 ld 9,.LC0@toc@l(10) 109 ld 9,0(9) 110 mr 3,9 111 addis 4,2,.LC7@toc@ha 112 addi 4,4,.LC7@toc@l 113 addis 9,2,.LC8@toc@ha 114 ld 5,.LC8@toc@l(9) 115 bl fprintf 116 nop 117 addis 10,2,.LC0@toc@ha 118 ld 9,.LC0@toc@l(10) 119 ld 9,0(9) 120 mr 3,9 121 addis 4,2,.LC9@toc@ha 122 addi 4,4,.LC9@toc@l 123 addis 9,2,.LC10@toc@ha 124 ld 5,.LC10@toc@l(9) 125 bl fprintf 126 nop 127 bl exported_function 128 nop 129 mr 3,9 130 addi 1,31,112 131 ld 0,16(1) 132 mtlr 0 133 ld 31,-8(1) 134 blr 135 .long 0 136 .byte 0,0,0,1,128,1,0,1 137 .size function,.-function 138 .align 2 139 .globl exported_function 140 .type exported_function, @function 141exported_function: 1420: addis 2,12,.TOC.-0b@ha 143 addi 2,2,.TOC.-0b@l 144 .localentry exported_function,.-exported_function 145 mflr 0 146 std 0,16(1) 147 std 31,-8(1) 148 stdu 1,-48(1) 149 mr 31,1 150 bl function 151 mr 3,9 152 addi 1,31,48 153 ld 0,16(1) 154 mtlr 0 155 ld 31,-8(1) 156 blr 157 .long 0 158 .byte 0,0,0,1,128,1,0,1 159 .size exported_function,.-exported_function 160 .ident "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2" 161 .section .note.GNU-stack,"",@progbits 162