2.3. How to Get a Map File

If all you need is a link map, then you can ask the linker for one. This is a little more subtle than you may expect, because the option must be passed to the program m1750-coff-ld rather than the Ada linker. Here is an example that generates a map called hello.map.

$ m1750-coff-gnatmake hello -largs -Wl,-Map=hello.map

Example 2-4. The Map File

$ more hello.map
...
LOAD /opt/m1750-ada-1.7/lib/gcc-lib/m1750-coff/2.8.1/art0.o
LOAD b~hello.o
LOAD ./hello.o
LOAD /opt/m1750-ada-1.7/lib/gcc-lib/m1750-coff/2.8.1/libada.a
LOAD /opt/m1750-ada-1.7/lib/gcc-lib/m1750-coff/2.8.1/libgcc.a
LOAD /opt/m1750-ada-1.7/lib/gcc-lib/m1750-coff/2.8.1/libc.a
LOAD /opt/m1750-ada-1.7/lib/gcc-lib/m1750-coff/2.8.1/libgcc.a
                0x00002000                _STACK_SIZE=0x2000
                0x00001000                _ISTACK_SIZE=0x1000
                0x00010000                _PROM_SIZE=0x10000
                0x00010000                _RAM_SIZE=0x10000
                0x00010000                _RAM_START=0x10000
                0x00000000                _PROM_START=0x0
                0x00020000                _RAM_END=(_RAM_START+_RAM_SIZE)
                0x0001fffe                _eistack=(_RAM_END-0x2)
                0x0001f000                _sistack=(_RAM_END-_ISTACK_SIZE)
                0x0001effe                _estack=(_sistack-0x2)
                0x0001d000                _sstack=(_sistack-_STACK_SIZE)
                0x0001cffe                _eheap=(_sstack-0x2)
...lots of output...