github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/boring/sig/sig_amd64.s (about) 1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 #include "textflag.h" 6 7 // These functions are no-ops, but you can search for their implementations 8 // to find out whether they are linked into a particular binary. 9 // 10 // Each function consists of a two-byte jump over the next 29-bytes, 11 // then a 5-byte indicator sequence unlikely to occur in real x86 instructions, 12 // then a randomly-chosen 24-byte sequence, and finally a return instruction 13 // (the target of the jump). 14 // 15 // These sequences are known to rsc.io/goversion. 16 17 #define START \ 18 BYTE $0xEB; BYTE $0x1D; BYTE $0xF4; BYTE $0x48; BYTE $0xF4; BYTE $0x4B; BYTE $0xF4 19 20 #define END \ 21 BYTE $0xC3 22 23 // BoringCrypto indicates that BoringCrypto (in particular, its func init) is present. 24 TEXT ·BoringCrypto(SB),NOSPLIT,$0 25 START 26 BYTE $0xB3; BYTE $0x32; BYTE $0xF5; BYTE $0x28; 27 BYTE $0x13; BYTE $0xA3; BYTE $0xB4; BYTE $0x50; 28 BYTE $0xD4; BYTE $0x41; BYTE $0xCC; BYTE $0x24; 29 BYTE $0x85; BYTE $0xF0; BYTE $0x01; BYTE $0x45; 30 BYTE $0x4E; BYTE $0x92; BYTE $0x10; BYTE $0x1B; 31 BYTE $0x1D; BYTE $0x2F; BYTE $0x19; BYTE $0x50; 32 END 33 34 // StandardCrypto indicates that standard Go crypto is present. 35 TEXT ·StandardCrypto(SB),NOSPLIT,$0 36 START 37 BYTE $0xba; BYTE $0xee; BYTE $0x4d; BYTE $0xfa; 38 BYTE $0x98; BYTE $0x51; BYTE $0xca; BYTE $0x56; 39 BYTE $0xa9; BYTE $0x11; BYTE $0x45; BYTE $0xe8; 40 BYTE $0x3e; BYTE $0x99; BYTE $0xc5; BYTE $0x9c; 41 BYTE $0xf9; BYTE $0x11; BYTE $0xcb; BYTE $0x8e; 42 BYTE $0x80; BYTE $0xda; BYTE $0xf1; BYTE $0x2f; 43 END 44 45 // FIPSOnly indicates that crypto/tls/fipsonly is present. 46 TEXT ·FIPSOnly(SB),NOSPLIT,$0 47 START 48 BYTE $0x36; BYTE $0x3C; BYTE $0xB9; BYTE $0xCE; 49 BYTE $0x9D; BYTE $0x68; BYTE $0x04; BYTE $0x7D; 50 BYTE $0x31; BYTE $0xF2; BYTE $0x8D; BYTE $0x32; 51 BYTE $0x5D; BYTE $0x5C; BYTE $0xA5; BYTE $0x87; 52 BYTE $0x3F; BYTE $0x5D; BYTE $0x80; BYTE $0xCA; 53 BYTE $0xF6; BYTE $0xD6; BYTE $0x15; BYTE $0x1B; 54 END