Added exe package to manage sections
This commit is contained in:
parent
955461d2de
commit
4faab9606c
16 changed files with 207 additions and 134 deletions
15
src/elf/cpu.go
Normal file
15
src/elf/cpu.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package elf
|
||||
|
||||
import "git.urbach.dev/cli/q/src/config"
|
||||
|
||||
// cpu returns the CPU architecture used in the ELF header.
|
||||
func cpu() int16 {
|
||||
switch config.TargetArch {
|
||||
case config.ARM:
|
||||
return ArchitectureARM64
|
||||
case config.X86:
|
||||
return ArchitectureAMD64
|
||||
default:
|
||||
panic("unknown architecture")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue