Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Linker Tools Warning LNK4254

Error Message

section 'section1' (offset) merged into 'section2' (offset) with different attributes

The contents of one section were merged into another, but the attributes of the two sections are different. Your program may give unexpected results. For example, data you wanted to be read only may now be in a writable section.

To resolve LNK4254, modify or remove the merge request.

When targeting x86 machines and Windows CE targets (ARM, MIPS, SH4, and Thumb) with Visual C++ 2005, the .CRT section is now read only. If your code depends on the previous behavior (.CRT sections are read/write), you could see unexpected behavior.

For more information, see,


The following sample generates LNK4254.

// LNK4254.cpp
// compile with: /W1 /link /WX
// LNK4254 expected
#pragma comment(linker, "/merge:.data=.text")
int main() {}

Community Additions

© 2015 Microsoft