From cc25fb36412a2535f5759280a5be1692d35b9a7e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 11 Feb 2011 16:05:26 +0000 Subject: [PATCH] * cygheap.cc (_cygheap_mid): Drop unneeded section attribute. (cygheap_init): Just zero cygheap structure. * cygwin.sc: Keep 16 byte alignment but drop all other alignments related to cygheap. Eliminate unused __cygheap_end1. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/cygheap.cc | 4 ++-- winsup/cygwin/cygwin.sc | 6 +----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b92047d9d..c9edae1dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2011-02-11 Christopher Faylor + + * cygheap.cc (_cygheap_mid): Drop unneeded section attribute. + (cygheap_init): Just zero cygheap structure. + * cygwin.sc: Keep 16 byte alignment but drop all other alignments + related to cygheap. Eliminate unused __cygheap_end1. + 2011-02-11 Corinna Vinschen * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 5fee0be8e..9c861d8e5 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -33,7 +33,7 @@ static mini_cygheap NO_COPY cygheap_at_start = init_cygheap NO_COPY *cygheap = (init_cygheap *) &cygheap_at_start; void NO_COPY *cygheap_max; -extern "C" char _cygheap_mid[] __attribute__((section(".cygheap"))); +extern "C" char _cygheap_mid[]; extern "C" char _cygheap_end[]; static NO_COPY muto cygheap_protect; @@ -159,7 +159,7 @@ cygheap_init () if (cygheap == &cygheap_at_start) { cygheap = (init_cygheap *) memset (_cygheap_start, 0, - _cygheap_mid - _cygheap_start); + sizeof (*cygheap)); cygheap_max = cygheap; _csbrk (sizeof (*cygheap)); /* Default locale settings. */ diff --git a/winsup/cygwin/cygwin.sc b/winsup/cygwin/cygwin.sc index 1a27f1a94..88b86e432 100644 --- a/winsup/cygwin/cygwin.sc +++ b/winsup/cygwin/cygwin.sc @@ -100,17 +100,13 @@ SECTIONS SORT(*)(.idata$7) . = ALIGN(16); __cygheap_start = ABSOLUTE(.); - . = ALIGN(0x10000); } .cygheap ALIGN(__section_alignment__) : { __cygheap_mid = .; - *(.cygheap) . = . + (1024 * 1024); - . = ALIGN(0x10000); + __cygheap_end = ABSOLUTE(.); } - __cygheap_end = ABSOLUTE(.); - __cygheap_end1 = __cygheap_mid + SIZEOF(.cygheap); /DISCARD/ : { *(.debug$S)