$ cat test.asm %ifdef _MAP [map all _MAP] %endif section F23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 $ nasm -v NASM version 2.15rc0 compiled on Dec 30 2018 $ nasm test.asm -o test.bin -l test.lst $ nasm test.asm -o test.bin -l test.lst -D_MAP=test.map ^C $ head --bytes 1536 test.map - NASM Map file --------------------------------------------------------------- Source file: test.asm Output file: test.bin -- Program origin ------------------------------------------------------------- 00000000 -- Sections (summary) --------------------------------------------------------- Vstart Start Stop Length Class Name 0 0 0 00000000 progbits .text 0 0 0 00000000 progbits F23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -- Sections (detailed) -------------------------------------------------------- ---- Section .text ------------------------------------------------------------ class: progbits length: 0 start: 0 align: not defined follows: not defined vstart: 0 valign: not defined vfollows: not defined ---- Section F23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------$ $ /usr/bin/nasm -v NASM version 2.12.01 $ /usr/bin/nasm test.asm -o test.bin -l test.lst $ /usr/bin/nasm test.asm -o test.bin -l test.lst -D_MAP=test.map ^C $ head --bytes 1536 test.map - NASM Map file --------------------------------------------------------------- Source file: test.asm Output file: test.bin -- Program origin ------------------------------------------------------------- 00000000 -- Sections (summary) --------------------------------------------------------- Vstart Start Stop Length Class Name 0 0 0 00000000 progbits .text 0 0 0 00000000 progbits F23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -- Sections (detailed) -------------------------------------------------------- ---- Section .text ------------------------------------------------------------ class: progbits length: 0 start: 0 align: not defined follows: not defined vstart: 0 valign: not defined vfollows: not defined ---- Section F23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------$ $