* emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
authorChristopher Faylor <me+cygwin@cgf.cx>
Tue, 28 Sep 2004 19:14:29 +0000 (19:14 +0000)
committerChristopher Faylor <me+cygwin@cgf.cx>
Tue, 28 Sep 2004 19:14:29 +0000 (19:14 +0000)
emulparams/i386pe_posix.sh, emulparams/mcorepe.sh, emulparams/mipspe.sh,
emulparams/ppcpe.sh, scripttempl/pe.sc: Define TARGET_PAGE_SIZE.
* scripttempl/pe.sc: Make the virtual address and file offset synced if the
alignment is lower than the target page size.

ld/ChangeLog
ld/emulparams/arm_epoc_pe.sh
ld/emulparams/armpe.sh
ld/emulparams/i386pe.sh
ld/emulparams/i386pe_posix.sh
ld/emulparams/mcorepe.sh
ld/emulparams/mipspe.sh
ld/emulparams/ppcpe.sh
ld/emulparams/shpe.sh
ld/scripttempl/pe.sc

index 68f359de5b006de7a1aa5189ec28c8a23ea3d8c7..0c6f1e83c92b02d7826053822a1305412b56b58c 100644 (file)
@@ -1,3 +1,12 @@
+2004-09-18  Filip Navara  <navaraf@reactos.com>
+
+       * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
+       emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
+       emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
+       TARGET_PAGE_SIZE.
+       * scripttempl/pe.sc: Make the virtual address and file offset synced if
+       the alignment is lower than the target page size.
+
 2004-09-27  Filip Navara  <navaraf@reactos.com>
 
        * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
index 04fa22db879a53f8be7e90cd5149af313e6d69fa..7cc4b220faeb9b4b2fde8f803af36db91f4fd0d2 100644 (file)
@@ -7,3 +7,4 @@ TEMPLATE_NAME=pe
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index aa605366e8c97f6e779d2db4624c64b114b8b4f3..5db5faf3468d89b4779f57763f26cb9ad949338c 100644 (file)
@@ -11,3 +11,5 @@ TEMPLATE_NAME=pe
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+
+TARGET_PAGE_SIZE=0x1000
index a8add23d6d1d65064fb1ca1b3bdb80cde5378df3..879379f9c5dffbdf3d385457a5e0fd477bc330fd 100644 (file)
@@ -6,3 +6,4 @@ TEMPLATE_NAME=pe
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index 37f51b5eeeaacc1780457a31bf6bf27cf7fdb9da..afa00de0cdf215a4e236e0cefb51674897a82892 100644 (file)
@@ -7,3 +7,4 @@ ENTRY="___PosixProcessStartup"
 SUBSYSTEM=7
 EXECUTABLE_NAME=a.out
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index 3c19e02ca1e81f5f0701be49077e7bd426148202..8326c2e514426883530d1284ba4c5955f8258f85 100644 (file)
@@ -7,3 +7,4 @@ TEMPLATE_NAME=pe
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index 9dd9ce761efb209d88a3bfc19150b3e1d670b584..a5cfc2ef60e4ad1eb90e9bfe5bb87ad89060b59c 100644 (file)
@@ -7,3 +7,4 @@ TEMPLATE_NAME=pe
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
 ENTRY="_mainCRTStartup"
+TARGET_PAGE_SIZE=0x1000
index a2d09ef2238b0e7f5a8847e5291c1a11716f5f0c..2e1e10207c8895879903ccb15b02511b4428a06f 100644 (file)
@@ -5,3 +5,4 @@ TEMPLATE_NAME=pe
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index 44aeef33be419ad1bba264ff6a63e000d59d3ccb..d50861f55d5a8ca3ffdaed1c4811d0d22d3ddd73 100644 (file)
@@ -7,3 +7,4 @@ INITIAL_SYMBOL_CHAR=\"_\"
 ENTRY="_mainCRTStartup"
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
index c6e25f50bee16c9fbd35de0482f10ed82c7e2afc..8cbfe352e4a27e352660900ea87b7d55e5e2687f 100644 (file)
@@ -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)