You must login to view /gokrazy/internal/src/commit/8ce5e378301e2faff05de3433fc1ba98384fb96f/config.
The GitHub option should be usable for most people, it only links via username.

Files
tools/internal/packer/elf.go

17 lines
436 B
Go

package packer
import (
"debug/elf"
"log"
)
func fileIsELFOrFatal(filePath string) {
f, err := elf.Open(filePath)
if err != nil {
log.Fatalf("%s is not an ELF binary! %v (perhaps running into https://github.com/golang/go/issues/53804?)", filePath, err)
}
if err := f.Close(); err != nil {
log.Fatalf("%s is not an ELF binary! Close: %v (perhaps running into https://github.com/golang/go/issues/53804?)", filePath, err)
}
}