This commit is contained in:
parent
3ae47f93eb
commit
cc2e98ca49
26 changed files with 541 additions and 11 deletions
15
src/elf/Arch.go
Normal file
15
src/elf/Arch.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package elf
|
||||
|
||||
import "git.urbach.dev/cli/q/src/build"
|
||||
|
||||
// Arch converts the architecture variable to an ELF-specific constant.
|
||||
func Arch(arch build.Arch) int16 {
|
||||
switch arch {
|
||||
case build.ARM:
|
||||
return ArchitectureARM64
|
||||
case build.X86:
|
||||
return ArchitectureAMD64
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue