Explorar el Código

Emit redirector functions in a fixed order.

Otherwise the order changes each time, which will make the build
egregiously non-deterministic.

Change-Id: Idd501ecd118c61a27566eafc61157715e48758bc
Reviewed-on: https://boringssl-review.googlesource.com/15026
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
Adam Langley hace 7 años
committed by CQ bot account: commit-bot@chromium.org
padre
commit
2c673f15f6
Se han modificado 1 ficheros con 11 adiciones y 4 borrados
  1. +11
    -4
      crypto/fipsmodule/delocate.go

+ 11
- 4
crypto/fipsmodule/delocate.go Ver fichero

@@ -23,6 +23,7 @@ import (
"fmt"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"unicode/utf8"
@@ -289,10 +290,16 @@ func transform(lines []string, symbols map[string]bool) (ret []string) {
ret = append(ret, "BORINGSSL_bcm_text_end:")

// Emit redirector functions. Each is a single JMP instruction.
for redirectorName, target := range redirectors {
ret = append(ret, ".type "+redirectorName+", @function")
ret = append(ret, redirectorName+":")
ret = append(ret, "\tjmp "+target)
var redirectorNames []string
for name := range redirectors {
redirectorNames = append(redirectorNames, name)
}
sort.Strings(redirectorNames)

for _, name := range redirectorNames {
ret = append(ret, ".type "+name+", @function")
ret = append(ret, name+":")
ret = append(ret, "\tjmp "+redirectors[name])
}

// Emit BSS accessor functions. Each is a single LEA followed by RET.


Cargando…
Cancelar
Guardar