Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 1 | .text |
Robert Sloan | 5cbb5c8 | 2018-04-24 11:35:46 -0700 | [diff] [blame] | 2 | .file 1 "inserted_by_delocate.c" |
| 3 | .loc 1 1 0 |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 4 | BORINGSSL_bcm_text_start: |
| 5 | .type foo, @function |
| 6 | .globl foo |
| 7 | .Lfoo_local_target: |
| 8 | foo: |
| 9 | movq $0, %rax |
| 10 | ret |
| 11 | |
| 12 | .Lbar_local_target: |
| 13 | bar: |
| 14 | # References to globals must be rewritten to their local targets. |
| 15 | # WAS call foo |
| 16 | call .Lfoo_local_target |
| 17 | # WAS jmp foo |
| 18 | jmp .Lfoo_local_target |
| 19 | # WAS jbe foo |
| 20 | jbe .Lfoo_local_target |
| 21 | # WAS jne foo |
| 22 | jne .Lfoo_local_target |
| 23 | |
| 24 | # Jumps to PLT symbols are rewritten through redirectors. |
| 25 | # WAS call memcpy@PLT |
| 26 | call bcm_redirector_memcpy |
| 27 | # WAS jmp memcpy@PLT |
| 28 | jmp bcm_redirector_memcpy |
| 29 | # WAS jbe memcpy@PLT |
| 30 | jbe bcm_redirector_memcpy |
| 31 | |
| 32 | # Jumps to local PLT symbols use their local targets. |
| 33 | # WAS call foo@PLT |
| 34 | call .Lfoo_local_target |
| 35 | # WAS jmp foo@PLT |
| 36 | jmp .Lfoo_local_target |
| 37 | # WAS jbe foo@PLT |
| 38 | jbe .Lfoo_local_target |
| 39 | |
| 40 | # Synthesized symbols are treated as local ones. |
| 41 | # WAS call OPENSSL_ia32cap_get@PLT |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 42 | call .LOPENSSL_ia32cap_get_local_target |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 43 | |
| 44 | # References to local labels are left as-is in the first file. |
| 45 | .Llocal_label: |
| 46 | |
| 47 | jbe .Llocal_label |
| 48 | leaq .Llocal_label+2048(%rip), %r14 |
| 49 | leaq .Llocal_label+2048+1024(%rip), %r14 |
| 50 | |
| 51 | # WAS .section .rodata |
| 52 | .text |
| 53 | .L1: |
| 54 | |
| 55 | .quad 42 |
| 56 | .L2: |
| 57 | |
| 58 | .quad .L2-.L1 |
| 59 | |
| 60 | # Local labels and their jumps are left alone. |
| 61 | .text |
| 62 | jmp 1f |
| 63 | 1: |
| 64 | |
| 65 | jmp 1b |
| 66 | # References to local labels are rewrittenn in subsequent files. |
| 67 | .Llocal_label_BCM_1: |
| 68 | |
| 69 | # WAS jbe .Llocal_label |
| 70 | jbe .Llocal_label_BCM_1 |
| 71 | # WAS leaq .Llocal_label+2048(%rip), %r14 |
| 72 | leaq .Llocal_label_BCM_1+2048(%rip), %r14 |
| 73 | # WAS leaq .Llocal_label+2048+1024(%rip), %r14 |
| 74 | leaq .Llocal_label_BCM_1+2048+1024(%rip), %r14 |
| 75 | |
| 76 | # WAS .section .rodata |
| 77 | .text |
| 78 | .L1_BCM_1: |
| 79 | |
| 80 | .quad 42 |
| 81 | .L2_BCM_1: |
| 82 | |
| 83 | # WAS .quad .L2-.L1 |
| 84 | .quad .L2_BCM_1-.L1_BCM_1 |
| 85 | |
| 86 | .text |
Robert Sloan | 5cbb5c8 | 2018-04-24 11:35:46 -0700 | [diff] [blame] | 87 | .loc 1 2 0 |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 88 | BORINGSSL_bcm_text_end: |
| 89 | .type bcm_redirector_memcpy, @function |
| 90 | bcm_redirector_memcpy: |
| 91 | jmp memcpy@PLT |
| 92 | .type OPENSSL_ia32cap_get, @function |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 93 | .globl OPENSSL_ia32cap_get |
| 94 | .LOPENSSL_ia32cap_get_local_target: |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 95 | OPENSSL_ia32cap_get: |
| 96 | leaq OPENSSL_ia32cap_P(%rip), %rax |
| 97 | ret |
| 98 | .extern OPENSSL_ia32cap_P |
| 99 | .type OPENSSL_ia32cap_addr_delta, @object |
| 100 | .size OPENSSL_ia32cap_addr_delta, 8 |
| 101 | OPENSSL_ia32cap_addr_delta: |
| 102 | .quad OPENSSL_ia32cap_P-OPENSSL_ia32cap_addr_delta |
| 103 | .type BORINGSSL_bcm_text_hash, @object |
| 104 | .size BORINGSSL_bcm_text_hash, 64 |
| 105 | BORINGSSL_bcm_text_hash: |
| 106 | .byte 0xae |
| 107 | .byte 0x2c |
| 108 | .byte 0xea |
| 109 | .byte 0x2a |
| 110 | .byte 0xbd |
| 111 | .byte 0xa6 |
| 112 | .byte 0xf3 |
| 113 | .byte 0xec |
| 114 | .byte 0x97 |
| 115 | .byte 0x7f |
| 116 | .byte 0x9b |
| 117 | .byte 0xf6 |
| 118 | .byte 0x94 |
| 119 | .byte 0x9a |
| 120 | .byte 0xfc |
| 121 | .byte 0x83 |
| 122 | .byte 0x68 |
| 123 | .byte 0x27 |
| 124 | .byte 0xcb |
| 125 | .byte 0xa0 |
| 126 | .byte 0xa0 |
| 127 | .byte 0x9f |
| 128 | .byte 0x6b |
| 129 | .byte 0x6f |
| 130 | .byte 0xde |
| 131 | .byte 0x52 |
| 132 | .byte 0xcd |
| 133 | .byte 0xe2 |
| 134 | .byte 0xcd |
| 135 | .byte 0xff |
| 136 | .byte 0x31 |
| 137 | .byte 0x80 |
| 138 | .byte 0xa2 |
| 139 | .byte 0xd4 |
| 140 | .byte 0xc3 |
| 141 | .byte 0x66 |
| 142 | .byte 0xf |
| 143 | .byte 0xc2 |
| 144 | .byte 0x6a |
| 145 | .byte 0x7b |
| 146 | .byte 0xf4 |
| 147 | .byte 0xbe |
| 148 | .byte 0x39 |
| 149 | .byte 0xa2 |
| 150 | .byte 0xd7 |
| 151 | .byte 0x25 |
| 152 | .byte 0xdb |
| 153 | .byte 0x21 |
| 154 | .byte 0x98 |
| 155 | .byte 0xe9 |
| 156 | .byte 0xd5 |
| 157 | .byte 0x53 |
| 158 | .byte 0xbf |
| 159 | .byte 0x5c |
| 160 | .byte 0x32 |
| 161 | .byte 0x6 |
| 162 | .byte 0x83 |
| 163 | .byte 0x34 |
| 164 | .byte 0xc |
| 165 | .byte 0x65 |
| 166 | .byte 0x89 |
| 167 | .byte 0x52 |
| 168 | .byte 0xbd |
| 169 | .byte 0x1f |