delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/02/10:41:59

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <6910a60806020741t7ff86d8bgbb7866e62acf1c09@mail.gmail.com>
Date: Mon, 2 Jun 2008 16:41:17 +0200
From: "Reini Urban" <rurban AT x-ray DOT at>
To: cygwin AT cygwin DOT com
Subject: rebase not compilable
MIME-Version: 1.0
X-Google-Sender-Auth: 1fe526f6a3514c5e
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I thought I'll improve the rebase logic by adding some fixed base
addresses and space to certain apps
(bash, perl, python, rest) to be able to properly rebase the culprit
packages in advance.

I wanted to start with
  /usr/bin/bash.exe
  /usr/bin/cygintl-8.dll
  /usr/bin/cygiconv-2.dll
  /usr/bin/cygreadline6.dll
  /usr/bin/cygncurses-8.dll
starting at -b 0x70000000 -o 0x10000 downwards,
then perl downwards with some reserve,
then python downwards with some reserve,
then fix rebaseall to work with bash and use the new base belowe python,
so that for a rebaseall only the cygwin services have to be stopped.

rebase should omit itself, so that it can be built with cygwin again.
rebase should also support switch -l (list).

But:

/usr/src/rebase-2.4.3-1/imagehelper
$ make -f Makefile.cygwin
g++ -O2     -c -o objectfile.o objectfile.cc
g++ -O2     -c -o objectfilelist.o objectfilelist.cc
g++ -O2     -c -o sections.o sections.cc
sections.cc: In member function `bool Relocations::check()':
sections.cc:288: error: ISO C++ forbids cast to non-reference type
used as lvalue
sections.cc: In member function `bool Relocations::fix()':
sections.cc:331: error: ISO C++ forbids cast to non-reference type
used as lvalue
sections.cc: In member function `bool Relocations::relocate(int)':
sections.cc:366: error: ISO C++ forbids cast to non-reference type
used as lvalue
make: *** [sections.o] Error 1

  for (; (char *)&relocp->SizeOfBlock < (char *)relocs + size &&
relocp->SizeOfBlock != 0; ((char *)relocp) += relocp->SizeOfBlock)
typedef struct _IMAGE_BASE_RELOCATION {
	DWORD VirtualAddress;
	DWORD SizeOfBlock;
} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;

There's some g++ pointer trickery involved which I cannot solve by my own.

/usr/src/rebase-2.4.3-1/imagehelper
$ make -f Makefile.mingw
g++ -O2  -mno-cygwin   -c -o sections.o sections.cc
sections.cc: In member function `bool Relocations::check()':
sections.cc:288: error: ISO C++ forbids cast to non-reference type
used as lvalue
sections.cc: In member function `bool Relocations::fix()':
sections.cc:331: error: ISO C++ forbids cast to non-reference type
used as lvalue
sections.cc: In member function `bool Relocations::relocate(int)':
sections.cc:366: error: ISO C++ forbids cast to non-reference type
used as lvalue
make: *** [sections.o] Error 1

-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019