On Jul 7 23:53, Charles Wilson wrote: > On 7/7/2011 3:43 PM, Corinna Vinschen wrote: > > I'll rework my patch to do the right thing(TM) for 32 and 64 bit DLLs. > > I'm not sure yet about the command line options. Maybe we use -b for > > the 32 bit base address and -B for the 64 bit base address? > > That seems logical. > > Alternatively, we could have rebase operate in "modes": > -w (wide?) operates exclusively on 64bit images, ignoring all others > (and use the 64bit db file with its distinct 4byte magic). > > otherwise, operate exclusively on 32bit images (and use the 32bit db > file...) > > Meh. Probably it is less confusing to the user, to work on all > specified dlls regardless of bitness, and not "ignore" any. Just means > extra book-keeping inside rebase itself.
Hmm, I don't know. Your -w idea has its merits. It's probably less confusing than having to specify two base addresses. Another problem is that we don't even know where to place the 64 bit DLLs typically. We know the 32 bit address space now pretty well, but so far I have only a fuzzy idea how the 64 bit VM space is used. > > Btw., peflags does not build on 64 bit mingw either, yet. > > Yeah, well...I'll let you implement all the hard stuff for rebase first, > then I (or anyone else, if I'm AFK...) can copy your working and vetted > implementation over to peflags. <g> Ok ;) > > * rebase.c: Convert all base address variables to ULONG64 > > throughout. > > (main): On Cygwin, call GetImageInfos64 to get Cygwin DLLs > > data. > > (print_image_info): Use conditional printf format string. > > (rebase): Call ReBaseImage64. Use conditional printf format string. > > (parse_args): Call string_to_ulonglong. > > (string_to_ulonglong): Rename from string_to_ulong, call > > strtoull, and return unsigned long long. > > Looks fine to me. Thanks. I checked it in with Eric's suggestion to use PRIx64. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat