Skip to content

Craksy/elf-magick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

This is intended for personal notes more than being an actual readme.

memory offset

a program might have the following headers:

flagsmemoryfilealign
r..0xa000-0xa0100x0000-0x00100x0100
r.x0xa100-0xa1290x0100-0x01290x0100
rw.0xa200-0xa2090x0200-0x02090x0100

The program might load in at 0xF234 with an ELF entry of 0x0123, which means it loads into the 2nd segment.

The entry offset is the difference in ELF entry and start of the segment which is was loaded offset = 0x0123-0x0100=0x0023 that would mean that the entry point is at 0xf234 + 0x0023 = 0xf257

base = 0xf234
print(hex(base & 0xff00))
print(hex(0x100-1))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published