This commit is contained in:
parent
ec4f774b64
commit
a1634554bf
1 changed files with 7 additions and 13 deletions
20
docs/elf.md
20
docs/elf.md
|
@ -4,12 +4,12 @@
|
|||
|
||||
1. ELF header [0x00 : 0x40]
|
||||
2. Program headers [0x40 : 0xB0]
|
||||
3. Padding
|
||||
4. Executable code [0x1000 : ...]
|
||||
3. String table
|
||||
4. Section headers
|
||||
5. Padding
|
||||
6. Read-only data [0x2000 : ...]
|
||||
7. String table
|
||||
8. Section headers
|
||||
6. Executable code [0x1000 : ...]
|
||||
7. Padding
|
||||
8. Read-only data [0x2000 : ...]
|
||||
|
||||
## Entry point
|
||||
|
||||
|
@ -20,16 +20,10 @@ The executables are compiled as position-independent executables (PIE). Therefor
|
|||
To ensure that execution permissions are properly applied,
|
||||
the code section and the data section are aligned on page boundaries. Permissions like read, write and execute can only be applied to an entire page in memory.
|
||||
|
||||
## Initialization in Linux
|
||||
|
||||
ELF loader:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/binfmt_elf.c
|
||||
|
||||
ELF register definitions:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/elf.h
|
||||
|
||||
## Links
|
||||
|
||||
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/binfmt_elf.c
|
||||
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/elf.h
|
||||
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/elf.h
|
||||
- https://lwn.net/Articles/631631/
|
||||
- https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue