Prior to 591fec858d01 ("Cygwin: decouple cygheap from Cygwin DLL")
the .cygheap section was required to stay the last section in the
final binary. That required some juggling with objcopy to make
sure the .gnu_debuglink section is prior to the .cygheap section
in the final DLL.
This isn't required anymore, so just drop it.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
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().
Modern gcc's generate additional DWARF 5 debug sections, which were
still missing in our Cygwin loader script. With ld from binutils 2.37,
this results in diagnostic output when linking the Cygwin DLL...
ld: cygwin0.dll:/4: section below image base
ld: cygwin0.dll:/20: section below image base
ld: cygwin0.dll:/36: section below image base
...and the section addresses given to these sections (.debug_loclists,
.debug_rnglists, debug_line_str) will be wrong.
Fix this by adding the missing DWARF 5 sections to our linker script
template cygwin.sc.in. Add a comment in terms of the deprecated
DWARF 4 section .debug_types.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>