Skip to content

Commit

Permalink
Add riscv64 ELF symbols (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett authored Dec 22, 2024
1 parent d480824 commit f80bbe5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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

4 comments on commit f80bbe5

@giordano
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Changing package repo URL not allowed, please submit a pull request with the URL change to the target registry and retry.

@giordano
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/121834

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.3 -m "<description of version>" f80bbe5d2a7e2f4b68077c4fda496a3fb7191cdc
git push origin v0.4.3

Please sign in to comment.