Compare commits

..

2 commits

5 changed files with 94 additions and 4 deletions

View file

@ -48,8 +48,8 @@
40 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
# Section Header Table Offset - e_shoff # Section Header Table Offset - e_shoff
# We dont have one! no offset # 64 + 56 + 16 + 16
00 00 00 00 00 00 00 00 98 00 00 00 00 00 00 00
# Processor Flags - e_flags - No flags set # Processor Flags - e_flags - No flags set
00 00 00 00 00 00 00 00
@ -68,9 +68,9 @@
# Section Header Count - e_shnum # Section Header Count - e_shnum
# Set to 3 based on example # Set to 3 based on example
00 00 03 00
##Section Header String Table Index - e_shstrndx ##Section Header String Table Index - e_shstrndx
# Set to 2 based on example # Set to 2 based on example
00 00 02 00

View file

@ -0,0 +1,3 @@
# String table. ".shstrab\0.text\0" -- 16 bytes
2e 73 68 73 74 72 74 61 62 00 2e 74 65 78 74 00

View file

@ -0,0 +1,29 @@
# Section header table, section 0 -- null -- 64 bytes
# 0x0A = offset to the name of the section in the string table
00 00 00 00
# 1 = type: null
00 00 00 00
# flags = executable | occupies memory
00 00 00 00 00 00 00 00
# address in virtual memory of this section
00 00 00 00 00 00 00 00
# offset in the file of this section (start of program code)
00 00 00 00 00 00 00 00
# size of this section in the file: 16 bytes
00 00 00 00 00 00 00 00
# sh_link -- not used for this section
00 00 00 00 00 00 00 00
# 0x01 = alignment code: default??
00 00 00 00 00 00 00 00
# sh_entsize: not used
00 00 00 00 00 00 00 00

View file

@ -0,0 +1,29 @@
# Section header table, section 1 -- program text -- 64 bytes
# 0x0A = offset to the name of the section in the string table
0a 00 00 00
# 1 = type: program data
01 00 00 00
# flags = executable | occupies memory
06 00 00 00 00 00 00 00
# address in virtual memory of this section
78 00 40 00 00 00 00 00
# offset in the file of this section (start of program code)
78 00 00 00 00 00 00 00
# size of this section in the file: 16 bytes
10 00 00 00 00 00 00 00
# sh_link -- not used for this section
00 00 00 00 00 00 00 00
# 0x01 = alignment code: default??
01 00 00 00 00 00 00 00
# sh_entsize: not used
00 00 00 00 00 00 00 00

View file

@ -0,0 +1,29 @@
# Section header table, section 2 -- string table
# 0x0 = offset to the name of the section in the string table
00 00 00 00
# 3 = type: string table
03 00 00 00
# 0x0 = flags
00 00 00 00 00 00 00 00
# 0x0 = address in virtual memory (not used)
00 00 00 00 00 00 00 00
# 0xB0 = offset in the file of this section (start of string table)
b0 00 00 00 00 00 00 00
# 0x10 = size of this section in the file: 16 bytes
10 00 00 00 00 00 00 00
# sh_link -- not used for this section
00 00 00 00 00 00 00 00
# 0x01 = alignment code: default??
01 00 00 00 00 00 00 00
# sh_entsize: not used
00 00 00 00 00 00 00 00