OSDN Git Service

* cygwin.sc: Make sure there's something in the cygheap.
authorcgf <cgf>
Fri, 14 Jul 2006 19:33:53 +0000 (19:33 +0000)
committercgf <cgf>
Fri, 14 Jul 2006 19:33:53 +0000 (19:33 +0000)
* dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at the end
rather than at the beginning.

winsup/cygwin/ChangeLog
winsup/cygwin/cygwin.sc
winsup/cygwin/dllfixdbg

index 2877f44..dcc4cd9 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-14  Christopher Faylor  <cgf@timesys.com>
+
+       * 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  <cgf@timesys.com>
 
        * sigproc.cc (waitq_head): Don't initialize to zero.
index cc2b9e6..58ee376 100644 (file)
@@ -106,6 +106,7 @@ SECTIONS
   {
     __cygheap_mid = .;
     *(.cygheap)
+    . = . + 1;
     . = ALIGN(512 * 1024);
   }
   __cygheap_end = ABSOLUTE(.);
index 909d113..4ffc4e6 100755 (executable)
@@ -24,9 +24,10 @@ while (<OBJDUMP>) {
     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;