I have noticed an alignment problem with the ELF output
format ELF executable at 0
entry start
section executable readable writeable
org 0
use32
start:
mov al,[section_2]
mov bl,[section_3]
mov cl,[section_4]
jmp $
;for this section the program header has this:
;p_vaddr = 0x000000b4 <--- should be 0x00000000
;p_paddr = 0x000000b4 <--- should be 0x00000000
section executable readable
section_2 db 2
;for this section the program header has this:
;p_vaddr = 0x000010c7 <--- should be 0x00001000
;p_paddr = 0x000010c7 <--- should be 0x00001000
section executable
section_3 db 3
;for this section the program header has this:
;p_vaddr = 0x000020c8 <--- should be 0x00002000
;p_paddr = 0x000020c8 <--- should be 0x00002000
section writeable
org 0xaaa0
section_4 db 4
;for this section the program header has this:
;p_vaddr = 0x000030c9 <--- should be 0x00003000
;p_paddr = 0x000030c9 <--- should be 0x00003000
I think alignment to page boundaries is not working properly.