Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add riscv64 ELF symbols #47

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ObjectFile"
uuid = "d8793406-e978-5875-9003-1fc021f44a92"
authors = ["Elliot Saba <[email protected]>"]
version = "0.4.2"
version = "0.4.3"

[deps]
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand Down
2 changes: 2 additions & 0 deletions src/ELF/ELFHeader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function elf_machine_to_arch(machine::UInt16)
return "aarch64"
elseif machine ∈ (EM_PPC64,)
return "ppc64le"
elseif machine ∈ (EM_RISCV,)
return "riscv64"
end
end

Expand Down
19 changes: 19 additions & 0 deletions src/ELF/constants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,25 @@ end
const EM_BA2 = 202 #Beyond BA2 CPU architecture
const EM_XCORE = 203 #XMOS xCORE processor family
const EM_MCHP_PIC = 204 #Microchip 8-bit PIC(r) family
#205-209 Reserved
const EM_KM32 = 210 #KM211 KM32
const EM_KMX32 = 211 #KM211 KMX32
const EM_EMX16 = 212 #KM211 KMX16
const EM_EMX8 = 213 #KM211 KMX8
const EM_KVARC = 214 #KM211 KVARC
const EM_CDP = 215 #Paneve CDP
const EM_COGE = 216 #Cognitive Smart Memory Processor
const EM_COOL = 217 #Bluechip CoolEngine
const EM_NORC = 218 #Nanoradio Optimized RISC
const EM_CSR_KALIMBA = 219 #CSR Kalimba
const EM_Z80 = 220 #Zilog Z80
const EM_VISIUM = 221 #Controls and Data Services VISIUMcore
const EM_FT32 = 222 #FTDI Chip FT32
const EM_MOXIE = 223 #Moxie processor
const EM_AMDGPU = 224 #AMD GPU
#225-242 Reserved
const EM_RISCV = 243 #RISC-V
const EM_BPF = 247 #Linux BPF -- in-kernel virtual machine
end

# Special Section Indices
Expand Down
Loading