Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C++
Linking
Linker Options
 /ALIGN (Section Alignment)
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual C++ Linker Options
/ALIGN (Section Alignment)
/ALIGN[:number]

where:

number

The alignment value.

The /ALIGN option specifies the alignment of each section within the linear address space of the program. The number argument is in bytes and must be a power of two. The default is 4K (4096). The linker issues a warning if the alignment produces an invalid image.

Unless you are writing an application such as a device driver, you should not need to modify the alignment.

It is possible to modify the alignment of a particular section with the align parameter to the /SECTION option.

The alignment value that you specify cannot be smaller than the largest section alignment.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.

  2. Click the Linker folder.

  3. Click the Command Line property page.

  4. Type the option into the Additional Options box.

To set this linker option programmatically

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker