BinPlace 目标目录

BinPlace 创建一个目录树来保存它放置的文件。 The structure of that tree is determined by the parameters that are passed to BinPlace's command line, the values of certain environment variables, and the contents of a text file known as a place file.

如果满足以下两个条件之一,则 BinPlace 将放置文件:

  1. 该文件在 BinPlace 命令行上指定。

  2. 该文件是驻留在其关联可执行文件所在的同一目录中的符号文件,并在命令行上指定可执行文件。 在这种情况下,符号文件和可执行文件将放置在不同的目录中。 BinPlace 还可以执行拆分或剥离(请参阅 公共符号和专用符号)或剥离(请参阅 符号文件系统)在此方案中。

当 BinPlace 放置文件时,它将自动覆盖具有相同名称的旧文件。 但是,默认情况下,BinPlace 不会覆盖较新的文件。 具体而言,如果存在较新的(或相同的)可执行文件版本,则可执行文件或任何关联的符号文件都不会写入磁盘。 If you wish BinPlace to overwrite files regardless of their timestamp, use the -f command-line option.

文件目标

BinPlace 在其命令行上放置任何文件的名称是通过连接两个目录( 根目标目录类子目录)创建的。 (目录可以具有你选择的任何名称,但根目标目录通常是放置文件的目录树的根目录,而类子目录是一个子目录,其中放置特定文件或文件组似乎是合乎逻辑的。

  • 可以使用 -r RootDestinationPath 命令行参数指定根目标目录。 如果省略此项,则默认值由基于 x86、基于 Itanium 或基于 x64 的计算机上的_NT386TREE、_NTIA64TREE或_NTAMD64TREE环境变量决定。 必须通过以下方式之一定义根目标目录:如果未定义,则 BinPlace 不会运行。

  • 类子目录通常在位置文件中指定。 可为一个文件指定多个类子目录;这会导致 BinPlace 创建文件的副本,并将其放置在每个指定位置。 有关完整详细信息,请参阅 “放置文件语法 ”。 还可以使用 -:D EST ClassPath 命令行参数指定类子目录。

符号文件目标

当 BinPlace 的命令行上列出可执行文件,并且同一目录中也存在关联的符号文件时,BinPlace 也会复制符号文件(或更改)。 放置此符号文件的目录通过连接三个目录来创建: 符号根目录类子目录文件类型子目录

  • 可以使用 -s SymbolRoot 命令行参数指定符号根目录。 If you are using the -a and -x switches, stripped symbol files will be placed under the SymbolRoot directory -- in this case, you can use -n FullSymbolRoot to specify the location of full symbol files.

  • 类子目录通常在位置文件中指定。 可为一个文件指定多个类子目录;这会导致 BinPlace 创建文件的副本,并将其放置在每个指定位置。 有关完整详细信息,请参阅 “放置文件语法 ”。 还可以使用 -:D EST ClassPath 命令行参数指定类子目录。 And if the -y command-line switch is used, no class subdirectory will be used for symbol files -- the destination directory will simply consist of the symbol root directory plus the file-type subdirectory.

  • 文件类型子目录仅用于符号文件。 它由原始文件的文件扩展名确定。 因此,与 .exe 文件关联的符号文件将放置在 exe 子目录中,与 DLL 关联的符号文件将放置在 dll 子目录中,与驱动程序关联的符号文件将放置在 sys 子目录中。 此约定有助于避免文件名冲突 -- 例如,myprogram.exe 和 myprogram.dll 可能都有名为 myprogram.pdb 的符号文件,但这些符号文件将放置在不同的子目录中。

此算法有一个例外。 If neither -s nor -n is supplied, the full symbol files will be placed in the same location as the binaries.

Note If you list the symbol file name in BinPlace's command line, BinPlace will move it like any other file and will not examine its contents. 若要使用 BinPlace 的符号文件作技术,必须列出可执行文件名称,而不是符号文件名。