Root > Integral parts > Options > Advanced page > Build options page

Build options page

Previous pageReturn to chapter overviewNext page   

This is "Advanced/Build options" page in EurekaLog project's options.

 

 

Build options

 

This page allows you to specify additional project build options.

 

1. "Reduce file size" option removes relocation table from file. This reduces file's size for about 10% (however, enabling EurekaLog also increases file's size).

 

It's recommended to always keep this option on.

 

Note: this option have no effect for DLL and packages. It is also ignored for executables marked with ASLR.

 

Technical explanation

When you compile a DLL (or a package which is a Delphi-specific DLL in disguise), the linker includes what is known as a relocation table. This table includes information about what addresses must be fixed up by the OS loader in the (likely) event that the DLL must be loaded at a different address than its intended-at-compile/link-time base address. You see, all DLLs come with a base address that is the "ideal" loading address of that module. The OS will try to load the DLL at this address to avoid the overhead of runtime rebasing (patching the in-memory pages of the DLL forces it to be paged in from disk and prevents cross-process sharing of the DLL pages). That's why you should set the Image base option in the Linker page of the project options of DLL and package projects. The default Image base that Delphi uses is $00400000 for both applications, DLLs and packages - and thus by default all DLLs and packages will need to be rebased - as that address is reserved for the process' EXE file.

 

The implication is that an EXE file will always be loaded at the fixed virtual address $00400000 and that it will never need to be rebased. Alas, it doesn't really need its relocation table and we can safely remove it, shrinking the size of the .EXE without affecting its behavior or performance.

 

See also: External tools options page.

 

 

2. "Check file corruption" option adds check for file corruption in your project. If you enable this option, EurekaLog will calculate a CRC checksum of the compiled file and store it inside file. EurekaLog will also read this checksum from file on its startup (launch). If your executable was modified, EurekaLog will display an appropriate message and shutdown your application immediately:

 

 

EurekaLog detected changes in executable file

 

You can use this option to ensure that your code wasn't modified.

 

Turn on for additional checks.

Turn off for best performance.

 

Warning: do not enable this option, if you're going to digitally sign your executable, to protect it with executable protector, or to pack it with executable packer. All 3 cases are not compatible with this option. Moreover, its use is redundant: each of 3 actions contain their own analogs of EurekaLog's "Check file corruption" option, so this option is not needed at all.

 

Notes:

CheckSum field in the IMAGE_OPTIONAL_HEADER structure is used to store CRC value inside executable file;
This option checks file on disk, not running process image;
Enabling this option will slow down loading and startup times on your executable. The bigger your executable file will be - the larger will be startup time: because the entire file must be read at startup;
Disabling "Compress debug info" option will produce a significantly larger executables, therefore significantly increasing CRC check time. Therefore, we do not recommend to enable "Check file corruption" option and disable "Compress debug info" option at the same time.

 

See also: External tools options page.

 

 

3. "Use low-level hooks" option allows or forbids using of low-level hooks.

 

Using low-level hooks allows you to capture low-level information such as CPU state. Low-level hooks are also required for additional WER functionality. However, a documented way of installing low-level hook is available only in Windows XP and later. For older OS - undocumented hack will be used. If this option is unchecked - EurekaLog will use RTL functionality and will not install low-level hooks.

 

Notes:

Low-level hooks will always be used on Delphi 2007 and below, since RTL support for handling exception was introduced in Delphi 2009.
Using of low-level hooks may introduce compatibility issues with 3rd party protection software.
EurekaLog uses different implementation on Windows 2000 and Windows XP and above:
oWindows 2000: use SEH - inject hook into KiUserExceptionDispatcher (undocumented hack).
oWindows XP+: use VEH - add handler via documented API.
This option controls only collecting information stage ("raise"). This option has no effect on other places. For example, hooks for handling exception are controlled by these options.

 

Turn on for best detalization.

Turn off for best compatibility.

 

See also: External tools options page.

 

 

See also:

 




Send feedback... Build date: 2024-12-19
Last edited: 2023-03-07
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/build_options_page.php