diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-10-26 21:16:35 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-10-28 16:26:53 +0200 |
commit | 2f9b8ff00cce0d0ceeb1091b6b9aecae914ddb89 (patch) | |
tree | 2adcede5e71e73240c69cd1be7cd96c4280459fc /winsup/cygwin/cygwin.sc.in | |
parent | c0776fa7bade123d5b33e44a9282f12dc3d2e10e (diff) | |
download | newlib-2f9b8ff00cce0d0ceeb1091b6b9aecae914ddb89.zip newlib-2f9b8ff00cce0d0ceeb1091b6b9aecae914ddb89.tar.gz newlib-2f9b8ff00cce0d0ceeb1091b6b9aecae914ddb89.tar.bz2 |
Cygwin: decouple cygheap from Cygwin DLL
One reason that ASLR is tricky is the fact that the cygheap
is placed at the end of the DLL and especially that it's expected
to be growable. To support ASLR, this construct must go.
Define dedicated cygheap memory region and reserve entire region.
Commit 3 Megs, as was the default size of the cygheap before.
Fix linker script accordingly, drop a now useless version check
in get_cygwin_startup_info().
Diffstat (limited to 'winsup/cygwin/cygwin.sc.in')
-rw-r--r-- | winsup/cygwin/cygwin.sc.in | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in index 742f599..d984c51 100644 --- a/winsup/cygwin/cygwin.sc.in +++ b/winsup/cygwin/cygwin.sc.in @@ -111,6 +111,11 @@ SECTIONS SORT(*)(.idata$7) . = ALIGN(16); } + .rsrc BLOCK(__section_alignment__) : + { + *(.rsrc) + *(SORT(.rsrc$*)) + } .gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD): { BYTE(0) /* c */ @@ -127,22 +132,6 @@ SECTIONS BYTE(0) /* \0 */ LONG(0) /* checksum */ } - .rsrc BLOCK(__section_alignment__) : - { - *(.rsrc) - *(SORT(.rsrc$*)) - _SYM (_cygheap_start) = .; - } - .cygheap ALIGN(__section_alignment__) : - { -#ifdef __x86_64__ - . = . + (3072 * 1024); -#else - . = . + (2048 * 1024); -#endif - . = ALIGN(0x10000); - _SYM (_cygheap_end) = .; - } /DISCARD/ : { *(.debug$S) |