From e0e832a321ff1258a46fc004ecabfe1ec7b5655f Mon Sep 17 00:00:00 2001 From: cgf Date: Fri, 14 Jul 2006 19:33:53 +0000 Subject: [PATCH] * cygwin.sc: Make sure there's something in the cygheap. * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at the end rather than at the beginning. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/cygwin.sc | 1 + winsup/cygwin/dllfixdbg | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2877f44fb7..dcc4cd95f6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2006-07-14 Christopher Faylor + + * cygwin.sc: Make sure there's something in the cygheap. + * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at + the end rather than at the beginning. + 2006-07-13 Christopher Faylor * sigproc.cc (waitq_head): Don't initialize to zero. diff --git a/winsup/cygwin/cygwin.sc b/winsup/cygwin/cygwin.sc index cc2b9e6c62..58ee37664e 100644 --- a/winsup/cygwin/cygwin.sc +++ b/winsup/cygwin/cygwin.sc @@ -106,6 +106,7 @@ SECTIONS { __cygheap_mid = .; *(.cygheap) + . = . + 1; . = ALIGN(512 * 1024); } __cygheap_end = ABSOLUTE(.); diff --git a/winsup/cygwin/dllfixdbg b/winsup/cygwin/dllfixdbg index 909d11355c..4ffc4e6ce3 100755 --- a/winsup/cygwin/dllfixdbg +++ b/winsup/cygwin/dllfixdbg @@ -24,9 +24,10 @@ while () { my ($idx, $name, $size, $vma, $lma, $fileoff, $algn) = /^\s*(\d+)\s+(\.\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/; if ($name eq '.gnu_debuglink') { push(@objcopy, '--set-section-flag', '.gnu_debuglink=contents,readonly,debug,noload'); + $idx = $section{'.gnu_debuglink'}{-idx} if defined($section{'.gnu_debuglink'}{-idx}); } elsif ($name eq '.gnu_debuglink_overlay') { push (@objcopy, '-R', '.gnu_debuglink_overlay'); - $section{'.gnu_debuglink'}{-idx} = $idx if $section{'.gnu_debuglink'}; + $section{'.gnu_debuglink'}{-idx} = $idx; next; } defined($idx) and @@ -53,6 +54,7 @@ for my $k (sort {$section{$a}{-idx} <=> $section{$b}{-idx}} keys %section) { } $vma = align($vma + $section{$k}{-size}, $section{$k}{-algn}); } + warn "$0: ERROR final VMA (" . sprintf("0x%08x", $vma) . ") not on 64K boundary\n" if $vma != align($vma, 64 * 1024); push(@objcopy, $dll, @ARGV); xit 1, @objcopy; -- 2.11.0