Reputation: 77
I work with pe files analyzer sofwares like exeinfoPe and in section list part there are both .text and CODE section types that we can use them for example change .data name to .text or CODE or other section names. are these section typesthe same? what is difference between them?
Upvotes: 2
Views: 4477
Reputation: 169
There is no semantic difference between the .CODE
and .TEXT
sections.
Just as in the MASM
assembler, the instruction space address is named by .CODE
section, and in other compilers is named by .CODE
.
So when you assemble your code with MASM
you will see .CODE
section as well as .TEXT
.
Upvotes: 0
Reputation: 244941
There is no functional difference between the .text
and .code
sections of a binary.
In almost all cases, they are completely synonymous (meaning that they refer to the same section), but even when they're not (e.g. due to the actual order of sections in the binary), they are semantically identical.
This is the section of the object file or address space that contains executable instructions ("code"), which are stored as plain text ("text"). It is almost always read-only, unlike the .data
section.
Consult the documentation for your assembler, compiler, linker, or disassembler to see which name it prefers. The PE format uses .text
.
Upvotes: 4