I wrote and compile program:

$ dmd demo.d

And I need disassembly it:

$ obj2asm ./demo ./demo.d -cdemo.cod

And I see asm file "demo.cod" without names of functions:

==================
.init   segment
        assume  CS:.init
                push    EBP
                mov     EBP,ESP
                push    EBX
                sub     ESP,4
                call    near ptr LC
LC:             pop     EBX
                add     EBX,01056Ch
                mov     EDX,-8[EBX]
                test    EDX,EDX
                je      L22
                call    near ptr LC0
L22:            call    near ptr L3F8
                call    near ptr LD338
                pop     EAX
                pop     EBX
                leave
                ret
.init   ends
.plt    segment
        assume  CS:.plt
L0:             push    dword ptr [080591A4h]
                jmp     dword ptr [080591A8h]
==================


>From other person I have received such listing with names:

==================
        assume  CS:_D4test1C5opAddMFC4test1CZC4test1C
L0:             push    EAX
                push    EBX
                push    offset FLAT:_D4test1C7__ClassZ
                call    near ptr __d_newclass
                mov     EBX,EAX
                mov     EAX,8[ESP]
                mov     ECX,8[EAX]
                mov     EDX,010h[ESP]
==================

What it is necessary to make such listing?


$ obj2asm
Digital Mars .OBJ file disassembler Version 8.51.3
Copyright (C) Digital Mars 2000-2007.  All Rights Reserved.
Written by Walter Bright  http://www.digitalmars.com/ctg/obj2asm.html
Use:
     obj2asm [-l] [-o] objfile[.obj] [srcfile] [-c[outfile[.cod]]]
        -c Specify output filename
        -l Omit generated code labels
        -o Output object code for each assembly instruction.
        -x Emit code offsets

Reply via email to