Skip to content

Commit

Permalink
incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
knickish committed Nov 8, 2024
1 parent cfdc35c commit 7764a26
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/read/elf/relocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,21 @@ fn parse_relocation<Elf: FileHeader>(
elf::R_LARCH_B26 => (K::Relative, E::LoongArchBranch, 26),
_ => unknown,
},
elf::EM_68K => match r_type {
elf::R_68K_32 => (K::Absolute, g, 32),
elf::R_68K_16 => (K::Absolute, g, 16),
elf::R_68K_8 => (K::Absolute, g, 8),
elf::R_68K_PC32 => (K::Relative, g, 32),
elf::R_68K_PC16 => (K::Relative, g, 16),
elf::R_68K_PC8 => (K::Relative, g, 8),
elf::R_68K_GOT32 => (K::Got, g, 32),
elf::R_68K_GOT16 => (K::Got, g, 16),
elf::R_68K_GOT8 => (K::Got, g, 8),
elf::R_68K_PLT32 => (K::PltRelative, g, 32),
elf::R_68K_PLT16 => (K::PltRelative, g, 16),
elf::R_68K_PLT8 => (K::PltRelative, g, 8),
_ => unknown,
},
elf::EM_MIPS => match r_type {
elf::R_MIPS_16 => (K::Absolute, g, 16),
elf::R_MIPS_32 => (K::Absolute, g, 32),
Expand Down
1 change: 1 addition & 0 deletions tests/round_trip/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ fn elf_any() {
(Architecture::X86_64_X32, Endianness::Little),
(Architecture::Hexagon, Endianness::Little),
(Architecture::LoongArch64, Endianness::Little),
(Architecture::M68k, Endianness::Big),
(Architecture::Mips, Endianness::Little),
(Architecture::Mips64, Endianness::Little),
(Architecture::Msp430, Endianness::Little),
Expand Down

0 comments on commit 7764a26

Please sign in to comment.