0

I have compiled a c# application and dll for "Any CPU" and decompiled both afterwards with ildasm.exe. In the next step I assembled the data (.il and .res) file back into an application/dll file with ilasm.exe which worked fine, except for the Large Address Aware flag.

When looking into the .il file, the COFF Header Characteristics 0x2122 indicate that the Large Address Aware flag was detected, but the re-assembled file is lacking this flag 0x2102.

Disassembler command:
ildasm.exe "test.dll" /out="test.il" /text /all /bytes /linenum /nobar /source /tokens

Assembler commands:
ilasm.exe "test.il" /out="test.il.dll" /res:"test.res" /dll /optimize /flags=0x2122

Does anybody have an idea why this is not working or what I am doing wrong?

null_ptr
  • 1
  • 1
  • These are the not the /flags you meant to use, 0x2122 is not a correct value. Options like /highentropyva set the DLL characteristics. But there isn't one for LAA, you need to use editbin.exe afterwards to turn it on. https://learn.microsoft.com/en-us/cpp/build/reference/largeaddressaware?view=vs-2019 – Hans Passant Apr 30 '19 at 21:42
  • Thanks a lot Hans Passant for your fast and precise help with both, the /flag meaning and how to set the LAA flag. – null_ptr May 01 '19 at 14:50

0 Answers0