Where is the map file?

Ralf Corsepius corsepiu at faw.uni-ulm.de
Wed Jun 7 11:27:13 UTC 2000


Nick.SIMON at syntegra.bt.co.uk wrote:
> 

> In your make/custom/<BSP>.cfg you'll find (probably two) make-exe steps
> defined. This is where $(NM) is used to generate a map file.  Mine looks
> like:
> 
> ifeq ($(RTEMS_USE_GCC272),yes)
> # The --defsym arguments define arguments which are required by the linkcmds
> # file which is designed for gcc 2.8
> define make-exe
>         $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
>             --defsym __fini=0 --defsym __init=0 \
>             -o $@ -u atexit -u __vectors -u download_entry \
>             $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-
> group
>         $(NM) -g -n $@ > $(basename $@).num
>         $(SIZE) $@
> endef
> else
> define make-exe
>         $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
>             $(LINK_OBJS) $(LINK_LIBS) -lstdc++
>         $(NM) -g -n $@ > $(basename $@).num
>         $(SIZE) $@
> endef
> endif

Hmm? Are you mixing up nm -g with ld -Map ?

The actual map file is generated by $(LD) -Map <mapfile>, rsp. $(CC)
-Wl,-Map,<mapfile> if invoking the linker via the compiler.

E.g. (from gensh1.cfg - which is what I am using :):

define make-exe
        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
            -Wl,-Map,$(basename $@).map \
            $(LDLIBS) -o $@ \
            $(LINK_OBJS) $(LINK_LIBS)
        $(NM) -n $@ > $(basename $@).num
        $(SIZE) $@
endef

Ralf

-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de



More information about the users mailing list