Skip to content

Commit 01ddd69

Browse files
committed
Support riscv64 ELF
1 parent a890639 commit 01ddd69

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ JLD2 = "0.1.6, 0.2, 0.3, 0.4, 0.5"
4141
JLLWrappers = "1.2.0"
4242
JSON = "0.21"
4343
LoggingExtras = "0.4, 1"
44-
ObjectFile = "0.4"
44+
ObjectFile = "0.4.3"
4545
OutputCollectors = "0.1"
4646
PkgLicenses = "0.2"
4747
Registrator = "1.1"

src/auditor/dynamic_linkage.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function platform_for_object(oh::ObjectHandle)
1515
ELF.EM_X86_64 => "x86_64",
1616
ELF.EM_AARCH64 => "aarch64",
1717
ELF.EM_PPC64 => "powerpc64le",
18-
ELF.EM_RISCV => "riscv64", # Could also be riscv32
18+
ELF.EM_RISCV => "riscv64", # Could also be riscv32; should check ELF_CLASS
1919
ELF.EM_ARM => "arm",
2020
)
2121
mach = oh.header.e_machine
@@ -122,6 +122,7 @@ function is_for_platform(h::ObjectHandle, platform::AbstractPlatform)
122122
elseif arch(platform) == "powerpc64le"
123123
return m == ELF.EM_PPC64
124124
elseif arch(platform) == "riscv64"
125+
# Could also be riscv32; should check ELF_CLASS
125126
return m == ELF.EM_RISCV
126127
elseif arch(platform) ("armv7l", "armv6l")
127128
return m == ELF.EM_ARM

0 commit comments

Comments
 (0)