diff --git a/util/fipstools/delocate/delocate.go b/util/fipstools/delocate/delocate.go index f3c94573b3c..a1674a12e74 100644 --- a/util/fipstools/delocate/delocate.go +++ b/util/fipstools/delocate/delocate.go @@ -1959,6 +1959,14 @@ func transform(w stringWriter, includes []string, inputs []inputFile, startEndDe w.WriteString(fmt.Sprintf(".file %d \"inserted_by_delocate.c\"%s\n", maxObservedFileNumber+1, fileTrailing)) w.WriteString(fmt.Sprintf(".loc %d 1 0\n", maxObservedFileNumber+1)) } + + w.WriteString(".type BORINGSSL_bcm_text_hash, @object\n") + w.WriteString(".size BORINGSSL_bcm_text_hash, 32\n") + w.WriteString("BORINGSSL_bcm_text_hash:\n") + for _, b := range fipscommon.UninitHashValue { + w.WriteString(".byte 0x" + strconv.FormatUint(uint64(b), 16) + "\n") + } + if d.processor == aarch64 { // Grab the address of BORINGSSL_bcm_test_[start,end] via a relocation // from a redirector function. For this to work, need to add the markers @@ -2139,13 +2147,6 @@ func transform(w stringWriter, includes []string, inputs []inputFile, startEndDe } } - w.WriteString(".type BORINGSSL_bcm_text_hash, @object\n") - w.WriteString(".size BORINGSSL_bcm_text_hash, 32\n") - w.WriteString("BORINGSSL_bcm_text_hash:\n") - for _, b := range fipscommon.UninitHashValue { - w.WriteString(".byte 0x" + strconv.FormatUint(uint64(b), 16) + "\n") - } - return nil } diff --git a/util/fipstools/delocate/testdata/aarch64-Basic/out.s b/util/fipstools/delocate/testdata/aarch64-Basic/out.s index b4716afdf09..997095e6b85 100644 --- a/util/fipstools/delocate/testdata/aarch64-Basic/out.s +++ b/util/fipstools/delocate/testdata/aarch64-Basic/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 .global BORINGSSL_bcm_text_start .type BORINGSSL_bcm_text_start, @function BORINGSSL_bcm_text_start: @@ -261,38 +296,3 @@ bss_symbol_bss_get: ret .cfi_endproc .size .LOPENSSL_armcap_P_addr, .-.LOPENSSL_armcap_P_addr -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/generic-FileDirectives-no-start-end/out.s b/util/fipstools/delocate/testdata/generic-FileDirectives-no-start-end/out.s index 5ab8fc7ef18..a994cd87950 100644 --- a/util/fipstools/delocate/testdata/generic-FileDirectives-no-start-end/out.s +++ b/util/fipstools/delocate/testdata/generic-FileDirectives-no-start-end/out.s @@ -1,19 +1,4 @@ .text -BORINGSSL_bcm_text_start: -.file 10 "some/path/file.c" "file.c" -.file 1000 "some/path/file2.c" "file2.c" -.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f - -# An instruction is needed to satisfy the architecture auto-detection. - movq %rax, %rbx -.text -BORINGSSL_bcm_text_end: -.type OPENSSL_ia32cap_get, @function -.globl OPENSSL_ia32cap_get -.LOPENSSL_ia32cap_get_local_target: -OPENSSL_ia32cap_get: - leaq OPENSSL_ia32cap_P(%rip), %rax - ret .type BORINGSSL_bcm_text_hash, @object .size BORINGSSL_bcm_text_hash, 32 BORINGSSL_bcm_text_hash: @@ -49,3 +34,18 @@ BORINGSSL_bcm_text_hash: .byte 0xff .byte 0x31 .byte 0x80 +BORINGSSL_bcm_text_start: +.file 10 "some/path/file.c" "file.c" +.file 1000 "some/path/file2.c" "file2.c" +.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f + +# An instruction is needed to satisfy the architecture auto-detection. + movq %rax, %rbx +.text +BORINGSSL_bcm_text_end: +.type OPENSSL_ia32cap_get, @function +.globl OPENSSL_ia32cap_get +.LOPENSSL_ia32cap_get_local_target: +OPENSSL_ia32cap_get: + leaq OPENSSL_ia32cap_P(%rip), %rax + ret diff --git a/util/fipstools/delocate/testdata/generic-FileDirectives/out.s b/util/fipstools/delocate/testdata/generic-FileDirectives/out.s index 80d7d526c2f..dc12794b9b4 100644 --- a/util/fipstools/delocate/testdata/generic-FileDirectives/out.s +++ b/util/fipstools/delocate/testdata/generic-FileDirectives/out.s @@ -1,22 +1,6 @@ .text .file 1002 "inserted_by_delocate.c" md5 0x00000000000000000000000000000000 .loc 1002 1 0 -BORINGSSL_bcm_text_start: -.file 10 "some/path/file.c" "file.c" -.file 1000 "some/path/file2.c" "file2.c" -.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f - -# An instruction is needed to satisfy the architecture auto-detection. - movq %rax, %rbx -.text -.loc 1002 2 0 -BORINGSSL_bcm_text_end: -.type OPENSSL_ia32cap_get, @function -.globl OPENSSL_ia32cap_get -.LOPENSSL_ia32cap_get_local_target: -OPENSSL_ia32cap_get: - leaq OPENSSL_ia32cap_P(%rip), %rax - ret .type BORINGSSL_bcm_text_hash, @object .size BORINGSSL_bcm_text_hash, 32 BORINGSSL_bcm_text_hash: @@ -52,3 +36,19 @@ BORINGSSL_bcm_text_hash: .byte 0xff .byte 0x31 .byte 0x80 +BORINGSSL_bcm_text_start: +.file 10 "some/path/file.c" "file.c" +.file 1000 "some/path/file2.c" "file2.c" +.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f + +# An instruction is needed to satisfy the architecture auto-detection. + movq %rax, %rbx +.text +.loc 1002 2 0 +BORINGSSL_bcm_text_end: +.type OPENSSL_ia32cap_get, @function +.globl OPENSSL_ia32cap_get +.LOPENSSL_ia32cap_get_local_target: +OPENSSL_ia32cap_get: + leaq OPENSSL_ia32cap_P(%rip), %rax + ret diff --git a/util/fipstools/delocate/testdata/generic-Includes/out.s b/util/fipstools/delocate/testdata/generic-Includes/out.s index c835dfe734a..09912d1519a 100644 --- a/util/fipstools/delocate/testdata/generic-Includes/out.s +++ b/util/fipstools/delocate/testdata/generic-Includes/out.s @@ -3,22 +3,6 @@ .text .file 1002 "inserted_by_delocate.c" md5 0x00000000000000000000000000000000 .loc 1002 1 0 -BORINGSSL_bcm_text_start: -.file 10 "some/path/file.c" "file.c" -.file 1000 "some/path/file2.c" "file2.c" -.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f - -# An instruction is needed to satisfy the architecture auto-detection. - movq %rax, %rbx -.text -.loc 1002 2 0 -BORINGSSL_bcm_text_end: -.type OPENSSL_ia32cap_get, @function -.globl OPENSSL_ia32cap_get -.LOPENSSL_ia32cap_get_local_target: -OPENSSL_ia32cap_get: - leaq OPENSSL_ia32cap_P(%rip), %rax - ret .type BORINGSSL_bcm_text_hash, @object .size BORINGSSL_bcm_text_hash, 32 BORINGSSL_bcm_text_hash: @@ -54,3 +38,19 @@ BORINGSSL_bcm_text_hash: .byte 0xff .byte 0x31 .byte 0x80 +BORINGSSL_bcm_text_start: +.file 10 "some/path/file.c" "file.c" +.file 1000 "some/path/file2.c" "file2.c" +.file 1001 "some/path/file_with_md5.c" "other_name.c" md5 0x5eba7844df6449a7f2fff1556fe7ba8d239f8e2f + +# An instruction is needed to satisfy the architecture auto-detection. + movq %rax, %rbx +.text +.loc 1002 2 0 +BORINGSSL_bcm_text_end: +.type OPENSSL_ia32cap_get, @function +.globl OPENSSL_ia32cap_get +.LOPENSSL_ia32cap_get_local_target: +OPENSSL_ia32cap_get: + leaq OPENSSL_ia32cap_P(%rip), %rax + ret diff --git a/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s b/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s index d75e2c7f1d0..62cdedc6f9a 100644 --- a/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s +++ b/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s @@ -1,30 +1,6 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 -BORINGSSL_bcm_text_start: - .text -.Lfoo_local_target: -foo: -.LCF0: - -0: - -999: - addis 2, 12, .LBORINGSSL_external_toc-999b@ha - addi 2, 2, .LBORINGSSL_external_toc-999b@l - ld 12, 0(2) - add 2, 2, 12 -# WAS addi 2,2,.TOC.-.LCF0@l - .localentry foo,.-foo -.Lfoo_local_entry: -.LVL0: - - bl -.text -.loc 1 2 0 -BORINGSSL_bcm_text_end: -.LBORINGSSL_external_toc: -.quad .TOC.-.LBORINGSSL_external_toc .type BORINGSSL_bcm_text_hash, @object .size BORINGSSL_bcm_text_hash, 32 BORINGSSL_bcm_text_hash: @@ -60,3 +36,27 @@ BORINGSSL_bcm_text_hash: .byte 0xff .byte 0x31 .byte 0x80 +BORINGSSL_bcm_text_start: + .text +.Lfoo_local_target: +foo: +.LCF0: + +0: + +999: + addis 2, 12, .LBORINGSSL_external_toc-999b@ha + addi 2, 2, .LBORINGSSL_external_toc-999b@l + ld 12, 0(2) + add 2, 2, 12 +# WAS addi 2,2,.TOC.-.LCF0@l + .localentry foo,.-foo +.Lfoo_local_entry: +.LVL0: + + bl +.text +.loc 1 2 0 +BORINGSSL_bcm_text_end: +.LBORINGSSL_external_toc: +.quad .TOC.-.LBORINGSSL_external_toc diff --git a/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s b/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s index dad7603ab0e..4d2f1cefdfa 100644 --- a/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s +++ b/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s @@ -1,40 +1,6 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 -BORINGSSL_bcm_text_start: - .text -.Lfoo_local_target: -foo: -# WAS addis 22,2,bar@toc@ha -# WAS ld 0,bar@toc@l(22) - addi 1, 1, -288 - mflr 0 - std 0, -8(1) - std 3, -16(1) - bl .Lbcm_loadtoc_bar - std 3, -24(1) - ld 3, -8(1) - mtlr 3 - ld 0, -24(1) - ld 3, -16(1) - addi 1, 1, 288 - addi 1, 1, -288 - std 3, -8(1) - mr 3, 0 - ld 0, 0(3) - ld 3, -8(1) - addi 1, 1, 288 -.text -.loc 1 2 0 -BORINGSSL_bcm_text_end: -.type bcm_loadtoc_bar, @function -bcm_loadtoc_bar: -.Lbcm_loadtoc_bar: - addis 3, 2, bar@toc@ha - addi 3, 3, bar@toc@l - blr -.LBORINGSSL_external_toc: -.quad .TOC.-.LBORINGSSL_external_toc .type BORINGSSL_bcm_text_hash, @object .size BORINGSSL_bcm_text_hash, 32 BORINGSSL_bcm_text_hash: @@ -70,3 +36,37 @@ BORINGSSL_bcm_text_hash: .byte 0xff .byte 0x31 .byte 0x80 +BORINGSSL_bcm_text_start: + .text +.Lfoo_local_target: +foo: +# WAS addis 22,2,bar@toc@ha +# WAS ld 0,bar@toc@l(22) + addi 1, 1, -288 + mflr 0 + std 0, -8(1) + std 3, -16(1) + bl .Lbcm_loadtoc_bar + std 3, -24(1) + ld 3, -8(1) + mtlr 3 + ld 0, -24(1) + ld 3, -16(1) + addi 1, 1, 288 + addi 1, 1, -288 + std 3, -8(1) + mr 3, 0 + ld 0, 0(3) + ld 3, -8(1) + addi 1, 1, 288 +.text +.loc 1 2 0 +BORINGSSL_bcm_text_end: +.type bcm_loadtoc_bar, @function +bcm_loadtoc_bar: +.Lbcm_loadtoc_bar: + addis 3, 2, bar@toc@ha + addi 3, 3, bar@toc@l + blr +.LBORINGSSL_external_toc: +.quad .TOC.-.LBORINGSSL_external_toc diff --git a/util/fipstools/delocate/testdata/ppc64le-Sample/out.s b/util/fipstools/delocate/testdata/ppc64le-Sample/out.s index 71ad6c20b3f..3f6836e1cfe 100644 --- a/util/fipstools/delocate/testdata/ppc64le-Sample/out.s +++ b/util/fipstools/delocate/testdata/ppc64le-Sample/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .file "foo.c" .abiversion 2 @@ -515,38 +550,3 @@ bcm_loadtoc__dot_LkString_local_target: blr .LBORINGSSL_external_toc: .quad .TOC.-.LBORINGSSL_external_toc -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s b/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s index e24f53ec45a..6451240ab5b 100644 --- a/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s +++ b/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .file "foo.c" .abiversion 2 @@ -640,38 +675,3 @@ bcm_loadtoc__dot_Lfunction_local_target: blr .LBORINGSSL_external_toc: .quad .TOC.-.LBORINGSSL_external_toc -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s b/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s index fc55ef2073b..ce4dcc0aeca 100644 --- a/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s +++ b/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .text .Lfoo_local_target: @@ -141,38 +176,3 @@ bcm_loadtoc__dot_Lfoo_local_target__minus_10: blr .LBORINGSSL_external_toc: .quad .TOC.-.LBORINGSSL_external_toc -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-BSS/out.s b/util/fipstools/delocate/testdata/x86_64-BSS/out.s index fd64b8f8fce..693c1babb16 100644 --- a/util/fipstools/delocate/testdata/x86_64-BSS/out.s +++ b/util/fipstools/delocate/testdata/x86_64-BSS/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .text movq %rax, %rax @@ -71,38 +106,3 @@ z_bss_get: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-Basic/out.s b/util/fipstools/delocate/testdata/x86_64-Basic/out.s index af5eb89ff39..655e167831b 100644 --- a/util/fipstools/delocate/testdata/x86_64-Basic/out.s +++ b/util/fipstools/delocate/testdata/x86_64-Basic/out.s @@ -1,6 +1,41 @@ .text .file 2 "inserted_by_delocate.c" .loc 2 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: # Most instructions and lines should pass unaltered. This is made up of # copy-and-pasted bits of compiler output and likely does not actually @@ -67,38 +102,3 @@ BORINGSSL_bcm_text_end: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-FourArg/out.s b/util/fipstools/delocate/testdata/x86_64-FourArg/out.s index f1e47fb811f..3fba28482e1 100644 --- a/util/fipstools/delocate/testdata/x86_64-FourArg/out.s +++ b/util/fipstools/delocate/testdata/x86_64-FourArg/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .type foo, @function .globl foo @@ -48,38 +83,3 @@ fooExternal_GOTPCREL_external: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-GOTRewrite/out.s b/util/fipstools/delocate/testdata/x86_64-GOTRewrite/out.s index a56f140ef70..4e863e1b979 100644 --- a/util/fipstools/delocate/testdata/x86_64-GOTRewrite/out.s +++ b/util/fipstools/delocate/testdata/x86_64-GOTRewrite/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .text .Lfoo_local_target: @@ -319,38 +354,3 @@ LOPENSSL_ia32cap_P_rax2: LOPENSSL_ia32cap_P_rbx3: leaq OPENSSL_ia32cap_P(%rip), %rbx jmp LOPENSSL_ia32cap_P_rbx3_return -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s index 7cc74fb8ab2..55ad1addf66 100644 --- a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s +++ b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .type foo, @function .globl foo @@ -119,38 +154,3 @@ BORINGSSL_bcm_text_end: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-LargeMemory/out.s b/util/fipstools/delocate/testdata/x86_64-LargeMemory/out.s index c460c570236..edadaaf96b6 100644 --- a/util/fipstools/delocate/testdata/x86_64-LargeMemory/out.s +++ b/util/fipstools/delocate/testdata/x86_64-LargeMemory/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .text @@ -53,38 +88,3 @@ OPENSSL_ia32cap_get: .quad h@GOT .Lboringssl_gotoff__Z1gv: .quad _Z1gv@GOTOFF -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-Sections/out.s b/util/fipstools/delocate/testdata/x86_64-Sections/out.s index d107e30ebf7..b93629bfc24 100644 --- a/util/fipstools/delocate/testdata/x86_64-Sections/out.s +++ b/util/fipstools/delocate/testdata/x86_64-Sections/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: # .text stays in .text .text @@ -53,38 +88,3 @@ BORINGSSL_bcm_text_end: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80 diff --git a/util/fipstools/delocate/testdata/x86_64-ThreeArg/out.s b/util/fipstools/delocate/testdata/x86_64-ThreeArg/out.s index 79cdbe60a56..f51994f12bf 100644 --- a/util/fipstools/delocate/testdata/x86_64-ThreeArg/out.s +++ b/util/fipstools/delocate/testdata/x86_64-ThreeArg/out.s @@ -1,6 +1,41 @@ .text .file 1 "inserted_by_delocate.c" .loc 1 1 0 +.type BORINGSSL_bcm_text_hash, @object +.size BORINGSSL_bcm_text_hash, 32 +BORINGSSL_bcm_text_hash: +.byte 0xae +.byte 0x2c +.byte 0xea +.byte 0x2a +.byte 0xbd +.byte 0xa6 +.byte 0xf3 +.byte 0xec +.byte 0x97 +.byte 0x7f +.byte 0x9b +.byte 0xf6 +.byte 0x94 +.byte 0x9a +.byte 0xfc +.byte 0x83 +.byte 0x68 +.byte 0x27 +.byte 0xcb +.byte 0xa0 +.byte 0xa0 +.byte 0x9f +.byte 0x6b +.byte 0x6f +.byte 0xde +.byte 0x52 +.byte 0xcd +.byte 0xe2 +.byte 0xcd +.byte 0xff +.byte 0x31 +.byte 0x80 BORINGSSL_bcm_text_start: .type foo, @function .globl foo @@ -40,38 +75,3 @@ BORINGSSL_bcm_text_end: OPENSSL_ia32cap_get: leaq OPENSSL_ia32cap_P(%rip), %rax ret -.type BORINGSSL_bcm_text_hash, @object -.size BORINGSSL_bcm_text_hash, 32 -BORINGSSL_bcm_text_hash: -.byte 0xae -.byte 0x2c -.byte 0xea -.byte 0x2a -.byte 0xbd -.byte 0xa6 -.byte 0xf3 -.byte 0xec -.byte 0x97 -.byte 0x7f -.byte 0x9b -.byte 0xf6 -.byte 0x94 -.byte 0x9a -.byte 0xfc -.byte 0x83 -.byte 0x68 -.byte 0x27 -.byte 0xcb -.byte 0xa0 -.byte 0xa0 -.byte 0x9f -.byte 0x6b -.byte 0x6f -.byte 0xde -.byte 0x52 -.byte 0xcd -.byte 0xe2 -.byte 0xcd -.byte 0xff -.byte 0x31 -.byte 0x80