2

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.

  • 1
    what are "smart names"? – Igor Skochinsky Oct 31 at 9:14
  • @IgorSkochinsky Args Src Dest FullPath - names that are deduced by their usage. – rec Oct 31 at 9:24
  • can you maybe add a code snippet and a sample of some error messages? – Igor Skochinsky Oct 31 at 9:28
  • @IgorSkochinsky I did include that. – rec Oct 31 at 10:23
  • Thanks. I don’t have suggestions for now but the problem is more clear. – Igor Skochinsky Oct 31 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.