简体   繁体   English

Delphi XE2中的Dcu

[英]Dcu in Delphi XE2

Is the *.dcu files in delphi xe2 for firemonkey application are independent from platforms. 用于Firemonkey应用程序的delphi xe2中的* .dcu文件是否独立于平台。 here . 在这里 for both 32bit and 64 bit and other operating systems. 适用于32位和64位以及其他操作系统。

If so how is the dcu files are designed. 如果是这样,如何设计dcu文件。 is it something similar to the previous(delphi 1-delphi xe) or something like an intermediate language(like java or .net) 它是否类似于先前的东西(delphi 1-delphi xe)或类似中间语言的东西(例如java或.net)

is this new dcu going to make the decompilation of dcu files easier. 这个新的dcu可以使dcu文件的反编译更容易吗?

The main intention of this question is to know some details about the pros and cons about the new dcu files for firemonkey. 这个问题的主要目的是了解有关firemonkey的新dcu文件的优缺点的一些详细信息。

Is the *.dcu files in delphi xe2 for firemonkey application are independent from platforms. 用于Firemonkey应用程序的delphi xe2中的* .dcu文件是否独立于平台。 here. 这里。 for both 32bit and 64 bit and other operating systems. 适用于32位和64位以及其他操作系统。

No they are not; 不,他们不是; Delphi XE2 generates different .dcu files for different platforms, and .dcu files for each platform are created in separated folders. Delphi XE2为不同的平台生成不同的.dcu文件,并且每个平台的.dcu文件都在单独的文件夹中创建。

To make it somewhat more insightful, some background info: 为了使其更具洞察力,请提供一些背景信息:

DCU's are more or less a combination of the following parts DCU或多或少是以下部分的组合

  1. The object code, which is normal statically compiled relocatable object code, just like what C or C++ would generate. 目标代码是正常的静态编译可重定位目标代码,就像C或C ++将生成的代码一样。
  2. debug code inclusive (a Topview variant if I'm not mistaken) 包含调试代码(如果我没记错的话,可以使用Topview变体)
  3. A precompiled header(interface) in some form. 某种形式的预编译头(接口)。
  4. unspecialized generics in some representation (*) 在某些表示形式中的非专业泛型(*)
  5. cross-unit inlinable code (tree representation?) 跨单元可插入代码(树表示?)

I don't know if all these 4 are separate sections or that they are interleaved. 我不知道这四个部分是否都是单独的部分,或者它们是否是交错的。 My guess is that 1+2 are combined (since that allows more generic routines in the linker) and there is a "rest" with 3+4+5 and maybe some other metadata. 我的猜测是1 + 2被合并了(因为允许在链接器中使用更多的常规例程),并且3 + 4 + 5以及其他一些元数据存在“剩余”。

Since headers might depend on OS specific types and symbols in system unit and OS specific units, even in theory only the most self contained units could be crossplatform. 由于标头可能取决于操作系统特定的类型和系统单位以及操作系统特定的单位中的符号,因此即使从理论上讲,只有最自包含的单位才可以是跨平台的。 Probably not worth the effort to bother. 可能不值得花精力去打扰。

As far as decompilation goes, it is pretty much the same as the general decompilation problem, with a few twists: 就反编译而言,它与一般的反编译问题几乎相同,但有一些不同之处:

  1. not yet finally linked (object) code is slightly easier decompilable 尚未最终链接(对象)的代码反编译起来稍微容易一些
  2. code with attached debug code is slightly easier decompilable. 带有调试代码的源代码更容易反编译。
  3. however the DCU format is version dependent and proprietary. 但是DCU格式取决于版本和专有。
  4. the entire decompilation process is very compiler and -version dependent. 整个反编译过程非常依赖于编译器和-version。

In short, it is probably not a bit easier than earlier Delphi compilers or even a static lib + header files of a random C++ compiler. 简而言之,它可能并不比早期的Delphi编译器甚至随机C ++编译器的静态lib +头文件简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM