I am trying to implement custom loader with linker script and elf file.
I can successfully load PT_LOAD type program header which can contain .text, .data section in it.
But what I really want is loading each data and text "section" separately and page-aligned.
I could successfully locate each section included in the PT_LOAD program header so far.
However, I need this section be page-aligned(0x1000) to load it separated page.
How can I locate all section in the specific program header be page-aligned ?