public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Ralf Habacker" <Ralf.Habacker@freenet.de>
To: "Cygwin" <cygwin@sources.redhat.com>
Subject: RE: rebase addon - Bas and Size listing of dll's without rebasing
Date: Fri, 28 Dec 2001 05:48:00 -0000	[thread overview]
Message-ID: <001501c18f95$cbf20720$0e6307d5@BRAMSCHE> (raw)
In-Reply-To: <20011227180503.GD2204@dothill.com>

> -----Original Message-----
> From: Jason Tishler [mailto:jason@tishler.net]
> Sent: Thursday, December 27, 2001 7:05 PM
> To: Ralf Habacker
> Cc: Cygwin
> Subject: Re: rebase addon - Bas and Size listing of dll's without
> rebasing
>
>
> Ralf,
>
> On Wed, Dec 26, 2001 at 09:08:49PM +0100, Ralf Habacker wrote:
> > On analysing this problem I added an option "-l" to the rebase tool to
> > list dll's imagebase and -size without rebasing. It's very interesting
> > to see how MS chooses there Imagebase.
>
> What about the following alternative solution:
>
>     $ objdump -p foo.dll | egrep '(ImageBase|SizeOfImage)'
>     ImageBase               68000000
>     SizeOfImage             0003f000

Try it with a recent objdump and a dll with auto-import variables and you will see that
objdump crashes. :-(

>
> > Because I hacked this very quick, I have used simple FILE structure
> > and fopen/fread calls.  Perhaps someone like to change this to iostream
> > functionality.
>
> At this point, my priorities are:
>
>     1. attempt to contribute rebase to binutils
>     2. work on the integration with setup.exe
>
> After the above is completed, then I would entertain adding such an
> option if the community deemed it appropriate.  But, wouldn't
> implementing it via ReBaseImage()'s fReBase parameter as opposed to
> plucking certain bytes out of the executable be a better approach?  I
> presume that this is how MS implements their '-s' (just sum image range)
> option.

I have done this, because I doesn't know any other way to do this, especially because of the
objdump bug.
There may be better solutions for this.

Ralf


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  parent reply	other threads:[~2001-12-28 11:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-26 14:01 Ralf Habacker
2001-12-27 10:22 ` Jason Tishler
2001-12-27 18:34   ` Robert Collins
2002-01-03  5:24     ` Jason Tishler
2002-01-03  5:27       ` Robert Collins
2002-01-04  6:10         ` Jason Tishler
2001-12-28  5:48   ` Ralf Habacker [this message]
2001-12-28 10:24     ` Christopher Faylor
2001-12-29  3:22       ` Ralf Habacker
2002-01-03  9:25         ` Ralf Habacker
2002-01-03 13:42           ` Robert Collins
2002-01-04  6:18             ` Jason Tishler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001501c18f95$cbf20720$0e6307d5@BRAMSCHE' \
    --to=ralf.habacker@freenet.de \
    --cc=cygwin@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).