REBASE.EXE的替代品是什么? [英] What's the replacement for REBASE.EXE?

查看:158
本文介绍了REBASE.EXE的替代品是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要重新安装我的程序安装的一组DLL文件,因为它是一个32位程序,现在地址空间太分散了。还有一个问题是,在冷启动时,将DLL的整体需求分配到RAM中,以便由于与某些DLL的基地址冲突,加载程序可以对其进行补充。一些DLL是我们编译的;其他人来自第三方。

I have a need to rebase the group of DLL files that I install with my program, because it's a 32-bit program and the address space is just too fragmented right now. Also there is the problem of the entirety of the DLLs being demand-paged into RAM on a cold boot so that the loader can rebase them, due to base address conflicts with some DLLs. Some DLLs are ones we have compiled; others are from 3rd parties.

我想做的是将工具rebase给定给定的一组DLL,以使DLL组占用连续的内存块。然后,该工具将在编译安装程序之前运行,并且重定向DLL将安装在应用程序的私有目录中。

What I would like to do is have a tool rebase a given set of DLLs so that the group of DLLs occupies a contiguous block of memory. This tool would then be run just prior to the compilation of the setup program, and the rebased DLLs would be installed in the application's private directory.

根据我的理解, Windows SDK附带的REBASE.EXE工具确实如此。给它一些DLL,并且它重新绑定。

From what I understand, the REBASE.EXE tool included with Windows SDK does/did exactly that. Give it some DLLs, and it rebases them.

不幸的是... Windows 8 Consumer Preview的Windows软件开发工具包(SDK)说:


工具许多已过时或已弃用的工具已从Windows SDK中删除。以下工具已被删除:

Tools Many obsolete or deprecated tools have been removed from the Windows SDK. The following tools have been removed:

< snip> ReBase.exe

<snip> ReBase.exe

现在怎么样?我不想开始使用一个显然已经过时的工具,并且将在下一个版本的Windows中消失。假设我正在阅读这个权利,使用ReBase.exe是什么替代品?我想限制自己使用Windows SDK和/或Visual Studio附带的工具,而不是引入第三方工具和/或编写自己的rebase代码。

What now? I don't want to start using a tool that is apparently obsolete and is going to go away in the next version of Windows. Assuming I'm reading this right, what's the replacement for using ReBase.exe? I would like to restrict myself to using tools that come with Windows SDK and/or Visual Studio, rather than introducing 3rd-party tools and/or writing my own rebase code.

或者,我接近整个问题的方式是错误的?

Or, am I approaching this entire problem the wrong way?

推荐答案

editbin.exe 附带VS2010,并具有/ REBASE选项。

editbin.exe comes with VS2010 and has a /REBASE option.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>editbin
Microsoft (R) COFF/PE Editor Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: EDITBIN [options] [files]

   options:

      /ALLOWBIND[:NO]
      /ALLOWISOLATION[:NO]
      /BIND[:PATH=path]
      /DYNAMICBASE[:NO]
      /ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
      /HEAP:reserve[,commit]
      /LARGEADDRESSAWARE[:NO]
      /NOLOGO
      /NXCOMPAT[:NO]
      /REBASE[:[BASE=address][,BASEFILE][,DOWN]]
      /RELEASE
      /SECTION:name[=newname][,[[!]{CDEIKOMPRSUW}][A{1248PTSX}]]
      /STACK:reserve[,commit]
      /SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|
                  EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|
                  NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]]
      /SWAPRUN:{[!]CD|[!]NET}
      /TSAWARE[:NO]
      /VERSION:#[.#]

正如马克指出,你会想关闭ASLR,您可以使用 / DYNAMICBASE:no

And as Mark points out you'll want to turn off ASLR, which you can do by using /DYNAMICBASE:no

这篇关于REBASE.EXE的替代品是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆