From a63c42932ecf41c1141789282838407329524e2c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 8 Jun 2005 20:56:34 +0000 Subject: [PATCH] * cygwin.sc: Apparently nonloading sections need to go last. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/cygwin.sc | 48 ++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7f449cf10..f7c908c5a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-06-08 Christopher Faylor + + * cygwin.sc: Apparently nonloading sections need to go last. + 2005-06-08 Christopher Faylor * cygwin.sc: Restore resource and reloc sections and use more modern diff --git a/winsup/cygwin/cygwin.sc b/winsup/cygwin/cygwin.sc index 855bbab9e..83b280f49 100644 --- a/winsup/cygwin/cygwin.sc +++ b/winsup/cygwin/cygwin.sc @@ -66,6 +66,30 @@ SECTIONS { *(.reloc) } + .idata ALIGN(__section_alignment__) : + { + /* This cannot currently be handled with grouped sections. + See pe.em:sort_sections. */ + SORT(*)(.idata$2) + SORT(*)(.idata$3) + /* These zeroes mark the end of the import list. */ + LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); + SORT(*)(.idata$4) + SORT(*)(.idata$5) + SORT(*)(.idata$6) + SORT(*)(.idata$7) + . = ALIGN(16); + __cygheap_start = ABSOLUTE(.); + } + .cygheap ALIGN(__section_alignment__): + { + __cygheap_mid = .; + *(.cygheap) + . = ALIGN(512 * 1024, 0x10000); + . += 8192; /* inexplicably needed for alignment on 64K boundary?!? */ + } + __cygheap_end = ABSOLUTE(.); + __cygheap_end1 = __cygheap_mid + SIZEOF(.cygheap); /DISCARD/ : { *(.debug$S) @@ -94,28 +118,4 @@ SECTIONS .debug_macinfo ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macinfo) } .debug_macinfo ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macinfo) } .debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) } - .idata ALIGN(__section_alignment__) : - { - /* This cannot currently be handled with grouped sections. - See pe.em:sort_sections. */ - SORT(*)(.idata$2) - SORT(*)(.idata$3) - /* These zeroes mark the end of the import list. */ - LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); - SORT(*)(.idata$4) - SORT(*)(.idata$5) - SORT(*)(.idata$6) - SORT(*)(.idata$7) - . = ALIGN(16); - __cygheap_start = ABSOLUTE(.); - } - .cygheap ALIGN(__section_alignment__): - { - __cygheap_mid = .; - *(.cygheap) - . = ALIGN(512 * 1024, 0x10000); - . += 8192; /* inexplicably needed for alignment on 64K boundary?!? */ - } - __cygheap_end = ABSOLUTE(.); - __cygheap_end1 = __cygheap_mid + SIZEOF(.cygheap); }