Skip to content

Commit

Permalink
XXX lib: Make objdump work on binaries in riscv64
Browse files Browse the repository at this point in the history
XXX: do the same for other architectures

* lib/linux/riscv64-mes/elf32-header.hex2: Fix header sizes for objdump.
  • Loading branch information
ekaitz-zarraga authored and janneke committed Oct 20, 2023
1 parent ab3da94 commit fc00d18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/linux/riscv64-mes/elf64-header.hex2
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
01 # e_ident[EI_DATA] Indicating little endianness
01 # e_ident[EI_VERSION] Indicating original elf

00 # e_ident[EI_OSABI] Set at 0 because none cares
00 # e_ident[EI_ABIVERSION] See above
03 # e_ident[EI_OSABI] Set at 3 because FreeBSD is strict
00 # e_ident[EI_ABIVERSION] Set at 0 because none cares

00 00 00 00 00 00 00 # e_ident[EI_PAD]

Expand All @@ -51,7 +51,7 @@ f3 00 # e_machine Indicating AMD64
01 00 00 00 # e_version Indicating original elf

# 0x18
&ELF_text 00 00 00 00 # e_entry Address of the entry point
&_start 00 00 00 00 # e_entry Address of the entry point (Number of bytes this header is + Base Address)
%ELF_program_headers>ELF_base # e_phoff Address of program header table
00 00 00 00

Expand All @@ -66,9 +66,9 @@ f3 00 # e_machine Indicating AMD64
01 00 # e_phnum number of entries in program table

40 00 # e_shentsize size of a section header table
07 00 # e_shnum number of entries in section table
05 00 # e_shnum number of entries in section table

04 00 # e_shstrndx index of the section names
02 00 # e_shstrndx index of the section names

# @40
:ELF_program_headers
Expand Down

0 comments on commit fc00d18

Please sign in to comment.