I'm cross-compiling for the SPARC/Leon3 processor under WinXP/msys or WinXP/cygwin, both with the same problem: there are many modules compiled with a Makefile (same CFLAGS for all modules). When disassembling the resulting application with sparc-elf-objdump -dS app > app.dis for some modules the listing includes the source lines, while for other modules it doesn't. When I disassemble separate object files the Source is always included: sparc-elf-objdump -dS module.o > module.dis
So it seems that source-line information is lost during linking ? But only for some modules, not for others ?
I tried to switch off optimization, tried to dos2unix & unix2dos all sources, all with the same result ...
Any ideas are welcome. Thanks & regards, Rolf.
The relevant part of the Makefile: CC = sparc-elf-gcc LD = sparc-elf-ld OBJDUMP = sparc-elf-objdump -dS MKPROM = sparc-elf-mkprom LIB = sparc-elf-ar cr RANLIB = sparc-elf-ranlib
LEON= -mv8 -msoft-float SVT= CFLAGS= -g -O0 -Wall $(LEON) $(DEFS) -Ificl40 -Ileonlib -DBELA_PBS LDFLAGS = -g $(SVT) -Lficl40 -Lleonlib LIBRARIES = $(SVT) -lleon -lficl -lsmall -lc -lm
HEADERS= $(wildcard *.h) SOURCES= $(wildcard *.c) OBJECTS= $(subst .c,.o,$(SOURCES))
pbs: $(HEADERS) $(OBJECTS) $(MYLIBS) $(CC) $(LDFLAGS) -g -Xlinker -Map -Xlinker $@.map $(OBJECTS) -o $@ $(LIBRARIES) -Ttext=$(PROM_SW_ADDR) $(OBJDUMP) $@ > $@.dis