Skip to content

Commit

Permalink
Move _cygheap_start into .cygheap section.
Browse files Browse the repository at this point in the history
Binutils >= 2.41 started making .rsrc section read-only, which caused
memset(_cygheap_start, ...) to segfault.  Instead, put _cygheap_start in
the .cygheap section, which makes more sense anyway, but may result in
reducing the difference between _cygheap_start and _cygheap_end by the
fraction of a page not used in the .rsrc section.

Fixes msys2#200
See-also: https://cygwin.com/pipermail/cygwin/2024-February/255472.html
Signed-off-by: Jeremy Drake <github@jdrake.com>
  • Loading branch information
jeremyd2019 committed Feb 20, 2024
1 parent 3cba82a commit 9058ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winsup/cygwin/cygwin.sc.in
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ SECTIONS
{
*(.rsrc)
*(SORT(.rsrc$*))
_SYM (_cygheap_start) = .;
}
.cygheap ALIGN(__section_alignment__) :
{
_SYM (_cygheap_start) = .;
#ifdef __x86_64__
. = . + (3072 * 1024);
#else
Expand Down

0 comments on commit 9058ddd

Please sign in to comment.