diff options
Diffstat (limited to 'ld/scripttempl/pe.sc')
-rw-r--r-- | ld/scripttempl/pe.sc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index c6e25f5..8cbfe35 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -54,7 +54,11 @@ ENTRY(${ENTRY}) SECTIONS { - .text ${RELOCATING+ __image_base__ + __section_alignment__ } : + ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is} + ${RELOCATING+ lower than the target page size. */} + ${RELOCATING+. = SIZEOF_HEADERS;} + ${RELOCATING+. = ALIGN(__section_alignment__);} + .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} : { ${RELOCATING+ *(.init)} *(.text) |