/ALIGN
(Section alignment)
Specify the alignment of each section within the executable image.
Syntax
/ALIGN
[:
number
]
Arguments
number
The alignment value in bytes.
Remarks
The /ALIGN
linker 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're writing an application such as a device driver, you shouldn't need to modify the alignment.
It's possible to modify the alignment of a particular section with the align
parameter to the /SECTION
option.
The alignment value that you specify can't be smaller than the largest section alignment.
To set this linker option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Choose the Configuration Properties > Linker > Command Line property page.
Enter the option in the Additional Options box. Choose OK or Apply to apply the change.
To set this linker option programmatically
- See AdditionalOptions.
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho