So I'm trying to reassemble an PE to ELF so I can debug it with rr.
However masm report duplicate symbol errors. It's because it doesn't enforce scope to it's variables so smart names cause conflicts. If they were postfixed with stack or data offset respectively there wouldn't be such problems.
Alternatively maybe there is a switch in masm which can correct those errors.
TRAOD_P4_orig.exe.v2.data.asm(1058192) : error A2005:symbol redefinition : Args TRAOD_P4_orig.exe.v2.data.asm(2724112) : error A2005:symbol redefinition : Dest
; LINE somewhere in the code above Dest = byte ptr -404h Args = byte ptr 10h ; LINE 1058192 ; char Args Args dd ? ; DATA XREF: _Caption_Draw:loc_523425\u2191r ; LINE 2724112 ; char Dest Dest db ? ; DATA XREF: sub_42DF68+38\u2191o
Apparently there was even a case where Memory was both a local variable and a data reference in the same function.