Muokkaa

Jaa


/FILEALIGN (Align sections in files)

The /FILEALIGN linker option lets you specify the alignment of sections written to your output file as a multiple of a specified size.

Syntax

/FILEALIGN:size

Parameters

size
The section alignment size in bytes, which must be a power of two.

Remarks

The /FILEALIGN option causes the linker to align each section in the output file on a boundary that is a multiple of the size value. By default, the linker does not use a fixed alignment size.

The /FILEALIGN option can be used to make disk utilization more efficient, or to make page loads from disk faster. A smaller section size may be useful for apps that run on smaller devices, or to keep downloads smaller. Section alignment on disk does not affect alignment in memory.

Use DUMPBIN to see information about sections in your output file.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > Command Line property page.

  3. Enter the option name /FILEALIGN: and the size in the Additional Options box.

To set this linker option programmatically

See also

MSVC linker reference
MSVC Linker Options