P
P
polger2019-03-06 21:46:51
visual studio
polger, 2019-03-06 21:46:51

How to merge all sections of a PE file into one?

I decided to try to reduce the weight of the program and found such an instruction. All is well, but why does merging the only two sections (.text and .rdata) create a new .idata section?
Combining it with .text fails. VS gives error: Error LNK1272 Cannot merge ".idata" with any section The program code is minimal, as in the instructions on the link. How to merge all sections into one?
#pragma comment(linker,"/MERGE:.idata=.text")

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question